p-co Posted September 24, 2009 Share Posted September 24, 2009 Hellow, I Have A Problem With This Script, What IS This Problem !? <?php $id = $_GET['service']; ?> <body onload="Check2();"> <input id="id" type="text" name="id" size="20" value="<?php echo $id; ?>"> <script language="javascript" type="text/javascript"> function Check2() { if ( document.getElementById('id').value == '11' ) { document.getElementById('package').value = '11'; } if ( document.getElementById('id').value == '12' ) { document.getElementById('package').value = '12'; } </script> <select name="package" class="add_user_input_select" id="package" size="1" dir="ltr"> <option> انتخاب کنید</option> <option value="11">XLHost - Plan1</option> <option value="12">XLHost - Plan2</option> </select> Test Link On Linux : http://173.45.75.13/client/Register.Ded.php?service=11 Any Idea!? Thanks. Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted September 24, 2009 Share Posted September 24, 2009 Maybe you could start by telling about what it is suppose to do and what errors you are getting. these are the errors I'm getting btw missing } after function body Register...ervice=11 (line 106) }\n Check2 is not defined Register...ervice=11 (line 1) Quote Link to comment Share on other sites More sharing options...
p-co Posted September 24, 2009 Author Share Posted September 24, 2009 Thank You. But I Can't Understand What Did You Say !? Can You Give Me a True Code !? Thanks. Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted September 24, 2009 Share Posted September 24, 2009 It means you're not closing the function Check2() with } function Check2(){ /* if (condition){ } */ } // you forgot to close the function with a curly bracket Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.