Document.write help, Im going nuts |
Document.write help, Im going nuts |
dani_boy |
Apr 24 2009, 12:47 PM
Post
#1
|
Group: Members Posts: 1 Joined: 24-April 09 Member No.: 8,427 |
Hey folks, im kinda stucked with this document.write thing..
I want to use document.write on this code: CODE <html> <head> <style type= "text/css"> <!-- INPUT {font-size:10px} .input{height:17px;font-size:10px} SELECT {font-size:10px} .select{height:17px;width:17;font-size:10px} BODY {margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; width:100%;height:100%;overflow:hidden;background-color:threedface;} --> </style> <script type="text/javascript"> function clearText(field){ if (field.defaultValue == field.value) field.value = ''; else if (field.value == '') field.value = field.defaultValue; } </script> <script type="text/javascript"> function dosearch() { var sf=document.searchform; var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value); window.location.href = submitto; return false; } </script> </head> <body> <form name="searchform" onSubmit="return dosearch();"> <select name="sengines"> <option value="http://sayip.info/lookup.php?ip=" selected>Location</option> <option value="http://sayip.info/whoislookup.php?whois=">Whois</option> </select> <input name="searchterms" type="text" onFocus="clearText(this)" onBlur="clearText(this)" value="Insert Ip..."> <input type="submit" name="SearchSubmit" value="Go"> </form> </body> </html> To be more specific i need something like this: CODE <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script> function sayip(){ var newWindow = window.open("about:blank", "width=200, height=200, resizable=no, maximizable=no"); newWindow.document.write("<html>\n<head>\n<title>Sayip Tools</title>\n</head>"); newWindow.document.write("<body>\n"); newWindow.document.write("<form name="searchform" onSubmit="return dosearch();">\n"); newWindow.document.write("<select name="sengines">\n"); newWindow.document.write("<option value="http://sayip.info/lookup.php?ip=" selected>Location</option>\n"); newWindow.document.write("<option value="http://sayip.info/whoislookup.php?whois=">Whois</option>\n"); newWindow.document.write("</select>\n"); newWindow.document.write("<input name="searchterms" type="text" onFocus="clearText(this)" onBlur="clearText(this)" value="Insert Ip...">\n"); newWindow.document.write("<input type="submit" name="SearchSubmit" value="Go">\n"); newWindow.document.write("</form>\n"); newWindow.document.close(); self.name = "main"; } // End --> </script> </head> <body> <input type=button value="Search" onClick="sayip()"> </p> </body> </html> I know its everything wrong, thats why i came across this site.lol I aprecciate any help on this, thanks in advance |
Lo-Fi Version | Time is now: 19th March 2024 - 08:21 AM |