robert_gsfame
Members-
Posts
876 -
Joined
-
Last visited
Everything posted by robert_gsfame
-
i really confuse with this, i have attached the code below * { margin:0; padding:0; } #demo { border:solid; width:300px; font-family:Verdana,Arial,Sans-Serif; font-size:12px; } #demo a { text-decoration:none; } #demo img { border: 2px solid #FFFFFF; } .news { width:200px; } .news ul li{ list-style:none;} .news .thumbnail { float:left; width:110px; } .news .info span.cat { display: block; padding-top:0px; margin-top:0px; font-size:10px; color:#808080; } .clear { clear: both; padding-top:5px; padding-bottom:5px;} Below is my html code: <table><tr><td> <div id="demo"> <div class="news"> <ul> <li> <div class="info"> <a href="test1.html">Test1</a> <span class="cat">Category: test1</span> </div> <div class="clear"></div> </li> <li> <div class="info"> <a href="test2.htm">test2</a> <span class="cat">Category: test2</span> </div> <div class="clear"></div> </li> <li> <div class="info"> <a href="test3.htm">Test3</a> <span class="cat">Category: test3</span> </div> <div class="clear"></div> </li> </ul> </div> </div></td><td> <div id="demo"><div class="news"> <ul> <li> <div class="info"> <a href="test1.html">Test1</a> <span class="cat">Category: test1</span> </div> <div class="clear"></div> </li> <li> <div class="info"> <a href="test2.htm">test2</a> <span class="cat">Category: test2</span> </div> <div class="clear"></div> </li> <li> <div class="info"> <a href="test3.htm">Test3</a> <span class="cat">Category: test3</span> </div> <div class="clear"></div> </li> </ul> </div> </div></td></tr><table> I create two columns with the same css style and text but the problem is that when i run it on my IE browser, all the text in the first column goes down and not located exactly next to the second column.... Thx
-
i wish to reload the page after executing the query, how to do it?? i use self.location() but i dont think its a good solution as i have to call back all the value that passed through url.window.reload() also not working well The page has to be reloaded as i put some function body onload=function() Thx for any helps and inputs
-
instead of having the another form, i use body onload=function() ....it works but i think i have to reload the page once form submitted to have the function work
-
okay i've change it, but the problem is not yet solved..... :'(
-
that is only a mistype anyway
-
i dont really get...could u please be specific :-\
-
I have dynamic combobox below is the html code and javascript function show(){ if (document.form1.country.value == "Brazil"){document.getElementById('city').innerHTML = "<select name='mycity' id='mycity'><option value='ABC' id='ABC'>ABC</option></select>"} <form name="form1" method="post" action="<?php $_SERVER['PHP_SELF'];?>"> <select name="country"><option value="brazil" id="brazil" onchange= onchange="show()">Brazil</option> <div id="city"></div> <input type="submit" value="submit> </form> now the problem is when i retrieve the data from mysql database, let say i have ABC already stored in the table (column 'city') then i wish to have it straight away once login...how can i do that as i have used onchange event and that will hide the 2nd combobox if 1st combobox not yet chosen
-
thx Nightslyr, selectedindex.value really solve everything!!!
-
I have dynamic combobox below is the html code and javascript function show(){ if (document.form1.country.value == "Brazil"){document.getElementById('city').innerHTML = "<select name='mycity' id='mycity'><option value='ABC' id='ABC'>ABC</option></select>"} <form name="form1" method="post" action="<?php $_SERVER['PHP_SELF'];?>"> <select name="country"><option value="brazil" id="brazil" onchange= onchange="show()">Brazil</option> <div id="city"></div> <input type="submit" value="submit> </form> The problem is with the php code $country=$_POST['country']; $city=$_POST['mycity']; <--------------- no value how to solve this??thanks in advance!
-
still unsolved, mind if you attach the sample of the code
-
I have dynamic combobox below is the html code and javascript function show(){ if (document.form1.country.value == "Brazil"){document.getElementById('city').innerHTML = "<select name='mycity' id='mycity'><option value='ABC' id='ABC'>ABC</option></select>"} <form name="form1" method="post" action="<?php $_SERVER['PHP_SELF'];?>"> <select name="country"><option value="brazil" id="brazil" onchange= onchange="show()">Brazil</option> <div id="city"></div> </form> The problem is with the php code $country=$_POST['country']; $city=$_POST['mycity']; <--------------- no value how to solve this??thx in advance!
-
;D ;D got it...i must return the value first......YAHOOOOOOOOOO!!!
-
I have 3 combobox, 1 combobox has been set first but the other 2nd combobox will depend on the 1st while the 3rd will depend on the 2nd combobox here is the javascript code: function showcity() { if (document.form1.country.value == "USA"){document.getElementById('mycity').innerHTML = "<select name='city' onchange='showaddress()'><option value='nocity' id='nocity'>Please choose city</option><option value='LA' id='LA'>Los Angeles</option>"} if (document.form1.country.value == "none"){document.getElementById('mycity').innerHTML = ""} if (document.form1.country.value == "none"){document.getElementById('myaddress').innerHTML = ""} } function showaddress() { if (document.getElementById("LA")){document.getElementById('myaddress').innerHTML = "<select name='address'><option value="noaddress">Please choose address</option><option value='rose'>Rose street</option></select>"} if(document.getElementById("nocity")){document.getElementById('myaddress').innerHTML = ""} } html code: <form name="form1"> <select name="country" onchange="showcity()"> <option value="none">Please choose at least one</option> <option value="USA">USA</option> <div id="mycity"></div> <div id="myaddress"></div> </form> The problem is when i choose "nocity", the 3rd combobox should disappear but it is not....may be there is something missing with the bold one?? thanks
-
are there anyone who can help me out, about making dynamic combo box there are two combo box. value on the second is depend from first combo box Thx
-
Should i use urldecode when trying to get the value from url using $_GET where the value itself that passed through url has been encoded using escape() javascript thx
-
Again another problem with an array without value. I have this code: All array will automatically created from 1 to 100 even if no value in it. Yet i use "undefined" to check the array and wish to replace the "undefined" with "nodata" ....i have tried but still the code not working :'( function check() { var a=0; var myarray=new Array(); for(i=1;i<100;i++){ if(document.getElementById(i)!==null){ if(document.getElementById(i).checked==true){ myarray[a]=i; a++; } } } if(a>0){ var okay= confirm("are you sure to erase all?"); if (okay== true){ if(myarray[0]!=="undefined"){ var data1=myarray[0]+",";}else{ var data1="nodata";} if(myarray[1]!=="undefined"){ var data2=myarray[1]+",";}else{ var data2="nodata";} var combine=data1+data2; var combine2=combine.substring(0,combine.length-1); } alert('combine2'); } thanks for your helps
-
Thx AlexWD
-
I have this, assume that var input is dynamic where i can change at anytime i want var input="my name is james from canada x"; i really wish to remove the x from the var input.....in php i can use substr($mystring,"",-1) and i will get my name is james from canada how can i do this in javascript...
-
function check() { var a=0; for(i=1;i<3;i++){ if(document.getElementById(i)!==null){ if(document.getElementById(i).checked==true){ a++; } } } if(a>0){ alert('You have chosen !');}else{ alert('Please choose one');} } This is the correct one!! got it!!
-
i also tried this but not working function check() { var a=0; for(i==1;i<3;i++){ if(document.getElementbyId(i)!==null){ if(document.getElementbyId(i).checked==false){ a++;}}} if(a==0){ alert('Please choose at least one');}else{ alert('thx for choosing');} }
-
again problem with checkbox...i am really newbie at javascript so hope that anyone could help i have this function function check() { if((document.getElementById('id1').checked==false)&&(document.getElementById('id2').checked==false)){ alert('please check at least one checkbox');}else{ alert('Are you sure?');} if there are 2 records with id=id1 and id=id2 then no problem will occur, what if let assume no record for id1 or in other words Null?? i have tried the above code but not working Thx for your help! }
-
thx mjdamoto..you're right about the closing bracket! Thank you so much! I didn't notice about that...
-
sorry, i think the problem is that i have 2 form the first one is where the checkbox is and the other where the button is...but then how can i get the id of that checkbox document.form["form1"].getElementbyId("id1").checked==1 ??
-
How come that this code is not working? <script type="text/javascript"> function check() { if(document.getElementById('id1').checked == true) { alert("number 1 checked"); }else{ alert("number 1 not checked");} </script> and here is my html code <form name=form1> <input type ="checkbox" name="checkbox1" id="id1">Checkbox 1 <input type="button" name="button1" onclick="check()"> </form>
-
I have problem when creating Check All to tick all the checkbox.. Let say i have 2 records from 3 available space that can be used to store the record, assume patient record patient A, patient C with all specific detail including name, address and everything and i put this when there is a record <input type=checkbox id=1>Delete ----------> for record A <input type=checkbox id=2>Delete ----------> for record B <input type=checkbox id=3>Delete ----------> for record C if there is no record, no checkbox will be appeared but <a href=insert_data.php>Insert Data</a> i have this : <a href="javascript:void(0)" onclick=" document.getElementById(1).checked=true; document.getElementById(2).checked=true; document.getElementById(3).checked=true;>check all</a> There is no problem when those 3 records are there, but if only A and C which means that the 2nd record is empty, then the checkall link will not do its function Can anyone help me? Thx