|
-
Jul 19th, 2007, 04:59 PM
#1
Thread Starter
New Member
Last edited by klaas_h; Jul 20th, 2007 at 03:55 PM.
-
Jul 19th, 2007, 10:45 PM
#2
Re: Focus cursor in textbox on pageload
PHP does not do that kind of stuff. You want Javascript. Let me look for code for you.
My usual boring signature: Something
-
Jul 19th, 2007, 10:47 PM
#3
Re: Focus cursor in textbox on pageload
Here you go:
HTML Code:
<?php
echo "
<html>
<head>
<link href=\"../../../CSS/HVB.css\" rel=\"stylesheet\" type=\"text/css\">
</head>
<body class=starturen>
<h1>Tijdregistratie:</h1>
<form action='leerling_aanmelden.php' name='login' method='post'>
<table border = 0 cellspacing = 2 cellpadding = 4>
<tr>
<td bgcolor='#D2E1F8'>Voer je loginnaam in: <input type='text' name='Loginnaam' size='15'/></td>
</tr>
<tr> <td bgcolor='#D2E1F8' align=right><input type='submit' value='Verder' /></td>
</tr>
</table>
</form>
</body>
</html>
";
?>
<script language="JavaScript">
<!--
document.login.Loginnaam.focus();
//-->
</script>
EDIT:
Also, avoid echo-ing HTML, especially big chunks like you are. Change it so that it goes to HTML and not PHP. If you need help with it, post the rest of your code.
My usual boring signature: Something
-
Jul 20th, 2007, 03:12 AM
#4
Thread Starter
New Member
Re: Focus cursor in textbox on pageload
Thanks for your help! I really appreciate your effort.
-
Jul 20th, 2007, 09:17 AM
#5
Re: Resolved: Focus cursor in textbox on pageload
There's actually no PHP there. dclamp is correct; only use <?php ... ?> around PHP code. The rest is just as per a regular HTML document.
By the way, an easier method of marking a thread resolved is to use the Thread Tools menu, above the first post.
Welcome to VBForums, too.
-
Jul 20th, 2007, 02:20 PM
#6
Re: Resolved: Focus cursor in textbox on pageload
Thanks for the rep 
welcome to vbf
My usual boring signature: Something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|