-
Posts
289 -
Joined
-
Last visited
Posts posted by adam84
-
-
This is what I have.... for some reason the five lines that deal with the border are not working in Firefox, but it is in IE. Just the background of the table changes colour. I just want to know if this is the correct logic for CSS. I do not have much experience in CSS.
CSS File
table.innerTable{ border-width: 2x; border-spacing: 1; border-style: solid; border-color: black; border-collapse: separate; background-color: #BFCFFE }
HTML File - a small
<TABLE CLASS=innerTable> <TR> <TD>User Name:</TD> <TD><INPUT TYPE=TEXTFIELD NAME=uName ID=uName MAXLENGTH=20 SIZE=30 VALUE='''></TD> </TR> </TABLE>
-
Awesome thanks!
-
I know totally different, but I just wanted to know if I do all my data validation after my form has been submitted is that considered to be good coding or should I do the validation first in javascript, then recheck everything in PHP. As of now, I am just doing everything in PHP because in a few past posts, people have said to validate the data in PHP because Javascript can be turned off. So if a user can turn their Javascript off, is it even worth validating in Javascript at all?
Thanks
-
I dont think you can do it that way.
You probably need to use ajax
-
Yea thats pretty much what I have now. I was just seeing if anyone knew of a more efficent way of doing it.
Thanks for you help!
-
Alrighty, I have a search page on my site and what I want to do is when the user hits the search button. I want to build my query and all that and print out the total number of records found. But since there could be a ton of records found, I only want to display x records per page, so far no problem.
My question is for me to do this would I have to build two different queries,
1. First query to count the total number of records found.
2. A second query to retrieve x amount of records, using LIMIT.
Is this pretty much the only way of doing this??? Thanks for your help
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <SCRIPT> function divToggle(){ if(document.getElementById('myDiv').style.display == ''){ document.getElementById('myDiv').style.display = 'none'; document.getElementById('show').innerHTML = '<a href="javascript:void(0);" onclick=divToggle();>Show</a>'; }else{ document.getElementById('myDiv').style.display = ''; document.getElementById('show').innerHTML = '<a href="javascript:void(0);" onclick=divToggle();>Hide</a>'; } } </SCRIPT> </head> <body> <table> <tr> <td></td> <td> <div id="myDiv" style="display:none"><input type="text" /><input type="text" /><input type="text" /></div> </td> </tr> </table> <DIV NAME="show" ID="show"><a href="javascript:void(0);" onclick=divToggle();>Show</a></DIV> </body> </html>
-
does the page refresh?
If it does, then you must loop through the drop down box options and select which option is currently selected
-
and my last questions would be how to get the form to perform an action. Can i just change
echo "<form>";
to
echo "<form action = "updateclient.php method="post">";
and how do i add the button for submitting here?
Like this
echo "<form action=\"updateclient.php\" method=\"post\">";
-
Then once your timer expires, call your ajax request function (from Javascript) with the PHP script that you want to run.
-
I dont know think it would run right off the bat, you could add it to your <BODY> tag
<BODY ONLOAD=init();>
something like that
-
I used the second one and echo 'This method';
It was the way I was taught. I find it my code to be cleaner that way, but in the end I guess if the code works then whatever
-
Like DJ Kat said, do you want to have the page to be refreshed or not?
-
if(document.images) { imgs = new Array("home_btn_h", "login_btn_h", "reg_btn_h", "del_forum_btn", "msgs_btn_h", "new_forum_btn_h", "reg_btn_h", "unread_btn_h"); for(var i=0; i<=imgs.size, i++) { imgs[i] = new Image(87, 30); imgs[i].src="assets/" + imgs[i] + ".gif"; alert("assets/" + imgs[i] + ".gif"); } }
You have a comma in your loop declaration. Make it
for(var i=0; i<=imgs.length; i++) {
whatever
}
See if that works!
-
Use the EMBED tag, then when the user clicks on a link, use javascript to change the SRC. This way, your page wouldnt have to refresh.
Embed tag information
-
PHP CODE
$donor=$_POST["donor"];
echo $donor;
mysql_query("INSERT INTO `hope` (fname, lname, idnum, gradyear, donor) VALUES ('$_POST[fname]','$_POST[lname]','$_POST[idnum]','$_POST[gradyear]','$donor')");
Try putting the $_POST outside of the quotes, and you need to have either single or double quotes to access the $_POST variables
mysql_query("INSERT INTO `hope` (fname, lname, idnum, gradyear, donor) VALUES ('".$_POST['fname']."','".$_POST['lname']."','".$_POST['idnum']."','".$_POST['gradyear']."','$donor')");
-
<?php $data = "let me guess. it\'s adding stuff like \"this\"?"; $data = str_replace("\'", "'", $data); print $data;
or you could use
print stripslashes( "let me guess. it\'s adding stuff like \"this\"?" );
-
oh sorry, 'contentFrame' is the name of the my frame
-
function goTo( url ){ parent.contentFrame.location = url; }
any ideas?
-
I have a site where users are able to internally send mail to each other. Would it be considered a good idea to use ajax to check and see if the user have any new mail. As of now, every time the user loads a new page, I check for any new mail and if there is I display “New Mail”. But if I created a function, that would check every x amount of seconds, would that be a waste of resources, a waste of querying the database?
I really like the idea of using ajax to do that, but again not all ideas are efficient. I much rather code it efficiently, so the site runs much quicker, than a cool idea that makes the site run slow.
Thanks
-
<?php for($i=1;$i<9;$i++) { $linkage = $project_row["img$ithumb"]; echo $linkage; } ?>
-
<IMG SRC='' ONCLICK=javascript:document.getElementById('myForm').submit(); STYLE=CURSOR:pointer; ALT='Click to checkout'>
-
function myFunc( newVar ){ window.frames["frame2"].src = 'frame2.php?val='+newVar; }
I think something like this should work
-
I have a textfield
<INPUT TYPE=TEXTFIELD NAME=handle ID=handle VALUE="<? echo stripslashes( $_GET['userHandle'] ); ?>">
If the userHandle'value is adam84, it works fine. The value is set to adam84.
But if the userHandle'value is "adam84". It messes up because of the quotes.
I tried to use single quotes the surounds the VALUE in the TEXTFIELD, but if there is a single quote in the userHandle, it screws up.
It does work if I remove the stripslashes function, but the value now comes up as \"adam84\" for the TEXTFIELD VALUE.
Any ideas, how I can set a VALUE of a TEXTFIELD with quotes in it?
What the devil ?!
in HTML Help
Posted
Yea, it shows up fine