Jump to content
bajetzashu89

Java Script-html

Recommended Posts

Posted

salut !

Am o problema cu un script java sau cel putin asa cred...

Problema este ca nu pot sa ma folosesc de acelasi script pentru un force select la mai multe listbox.

Scriptul merge decat la un singur produs !

Am scriptul asta :

<script type="text/javascript">

function reqSel()

{

var result = "1";

var txt = "Please select size !";

var warn = new Array();

warn[0] = "*";

var F = document.forms["page1"];

if(F.elements["product[select Size]"].options[F.elements["product[select Size]"].options.selectedIndex].value == '')

{

result += warn[0];

}

if(result.length > 0)

{

alert(txt + result + "\n__________________\n\nThank you!");

return false;

}

else

{

return true;

}

}

</script>

iar in pagina mea asta :

<form action="http://ww8.aitsafe.com/cf/add.cfm" method="post" name="page1" onsubmit="return reqSel()">

<input type="hidden" name="userid" value="993277092">

<input type="hidden" name="product[]" value="Denumire produs">

<input type="hidden" name="price" value="47.5">

<input type="hidden" name="return" value="www.website.com"><br>

<select class="rounded" name="product[select Size]">

<option value="">Select Size</option>

<option value="36">36</option>

<option value="40">40</option>

</select>

<br>

<input class="rounded" type="image" src="images/content/1.png"/>

</form>

Cum as putea sa fac ca scriptul asta sa mearga cu inca 100 de produse diferite ,sau daca are cineva vre-o idee de alta modalitate e a forta cumparatorul sa aleaga ceva din lista de produse!

Multumesc !

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...