View Single Post
Unread 01-11-2008, 06:58 AM
ISMAILC ISMAILC is offline
Member
Join Date: Dec 2007
Posts: 45
  #3  
Default Thank You

Hi, Thank You i got it going with Help!

Fancy Javascript was needed:
Regards,

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
;(function(){
var field='Something', //set the name of the field
getQval = function (n) {
var r=new RegExp('[?&;]'+n+'=([^&;#]*)'), m=location.search;
return (m=r.exec(m))? unescape(m[1]) : null;
}, updateForm = function() {
var fname=getQval('fname')? getQval('fname') : 0;
document.forms[fname].elements[field].value=val;
}, val=getQval(field);
if(val){
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", updateForm, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", updateForm );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
updateForm();
};}
else window.onload = updateForm;}}})();
</script>
</head>
<body>
<form action="ajax.htm">
<div>
<input type="text" name="Something">
</div>
</form>
</body>
</html>
Reply With Quote