need some troubleshooting help

liunx

Guest
undefined <br />
<br />
Okay, I'm a newbie but I'm managing to get some things to work by reading tutorials etc. I've got this page on which I've place a form and a search engine java script. Now the forms show up okay but the submit buttons are not functioning. In addition to that I've got some stray javascript appearing at the top of the page. So here is the code:<br />
<br />
<html><br />
<head><br />
<title>Need a translator?</title><br />
<script language="JavaScript"></script><!-- This script and many more are available free online at --><!-- The JavaScript Source!! <!-- m --><a class="postlink" href="http://javascript.internet.com">http://javascript.internet.com</a><!-- m --> --><!-- Begin<br />
function searchFunc() {<br />
var newWindow = window.open("about:blank", "searchValue", "width=200, height=200, resizable=no, maximizable=no");<br />
var searchValue = document.search.queryField.value;<br />
var yahooSearch = document.search.yahoo.value;<br />
var altavistaSearch = document.search.altavista.value;<br />
var webcrawlerSearch = document.search.webcrawler.value;<br />
var exciteSearch = document.search.excite.value;<br />
newWindow.document.write("<html--><br />
</head><br />
<body><br />
\n\n\n \n"); newWindow.document.write("<a<br />
href=http://www.webdeveloper.com/forum/archive/index.php/"+yahooSearchsearchValue+" target="main">Yahoo!</a><br><br />
<br><br />
\n"); newWindow.document.write("<a href=http://www.webdeveloper.com/forum/archive/index.php/"+altavistaSearchsearchValue+"<br />
target="main">Altavista</a><br><br />
<br><br />
\n"); newWindow.document.write("<a href=http://www.webdeveloper.com/forum/archive/index.php/"+webcrawlerSearchsearchValue+"<br />
target="main">WebCrawler</a><br><br />
<br><br />
\n"); newWindow.document.write("<a href=http://www.webdeveloper.com/forum/archive/index.php/"+exciteSearchsearchValue+"<br />
target="main">Excite</a><br><br />
<br><br />
\n"); newWindow.document.close(); self.name = "main"; } // End;<br />
<h1>Victor L Foster: Professional Translator & Terminologist</h1><br />
<form action="<a" href=http://www.webdeveloper.com/forum/archive/index.php/"mailto:%22" <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->="><br />
method="<br />
post="">Describe the work you want here: <input type="text"<br />
name="some_text" size="30" maxlength="350"><br />
<p> Check here if it's a translation: <input type="checkbox"<br />
name="box"> </p><br />
<p> Check here if it concerns terminology: <input type="checkbox"<br />
name="box"> </p><br />
<p> Select a field:<br />
<select name="choice"><br />
<option selected="selected"> medical </option><br />
<option> software/hardware </option><br />
<option> scientific </option><br />
<option> technical </option><br />
</select><br />
</p><br />
<p> </p><br />
<p> </p><br />
<hr> Finally, click here to submit it: <input type="submit"<br />
value="Send it"> or <input type="reset" value="Erase all"><br />
<p> </p><br />
</form><br />
<form name="search"> <input type="hidden" name="yahoo"<br />
value="http://search.yahoo.com/search?p="> <input type="hidden"<br />
name="altavista"<br />
value="http://www.altavista.com/cgi-bin/query?pg=q&what=web&fmt=.&q="> <input<br />
type="hidden" name="webcrawler"<br />
value="http://www.webcrawler.com/cgi-bin/WebQuery?searchText="> <input<br />
type="hidden" name="excite"<br />
value="http://www.excite.com/search.gw?trace=a&search="> Search the<br />
internet for: <input type="text" size="25" name="queryField"> <br><br />
<input type="button" value="Search" onclick="searchFunc()"> <input<br />
type="reset" value="Clear"> <br><br />
(A separate window will open where you can select a search engine.) </form><br />
<center> <font face="arial, helvetica" size="" -2="">Free JavaScripts<br />
provided<br><br />
by <a href=http://www.webdeveloper.com/forum/archive/index.php/"http://javascriptsource.com">The JavaScript Source</a></font> </center><br />
<p><!-- Script Size: 2.49 KB --> </p><br />
</body><br />
</html><br />
So if someone could help me out I'd appreciate. On another page, I managed to get a ticker script to work but on the same page I have a drop down menu with a text box underneath. You click on one of the options in the text box and the text corresponding to the question should appear in the text box. That is not happening so that is confusing. I still won't know how to write my own script when this is over with but I'll be able to troubleshoot a little, I imagine. I'm trying to figure out how to add in these "onload=", "onclick=" tags that you place in the body tag but it's not always apparent what to put in to make the script do what it is designed to do.<br />
<br />
thanks a lot in advance.<!--content-->Either you have a ton of syntax errors, or the forum tore up your post beyond any hope.<br />
<br />
Please post a link to the page (preferred), attach a .txt file, or fix your post.<!--content-->Yes, there are some obvious syntax errors that even I can see but those are minor.The text editor seems intent on generating them and those I can fix. I'll be attaching a screenshot as well so you can see what the actual page looks like. This script that is appearing on the page in the view mode must be the result of a syntax error, right? And in both cases, with the form and the search engine neither button works. Submit doesn't submit the form but I beleive I should have a cgi-bin folder with a script in it that handles that. As for the search engine I'm not sure why a new window doesn't open up when you click it.<br />
<br />
Thanks for your help.<!--content-->This is just so I can attach the screenshot. It may be useful in demonstrating the problem.<br />
<br />
Well I can't because the file size is slightly too large.<!--content-->I took a look at the code. It was really messed up. I couldn't even count the number of syntax errors I found. Everything from the <script> tag being terminated before the script(!) to your form being named "search", which is a javascript reserved word...All in all, it had lots of problems. :D<br />
<br />
Here is a working version...<!--content-->Oh, by the way...I fixed the form you made to get some info from your visitors. You had the wrong syntax in the mailto...<!--content-->Thanks for your help but i wasn't able to use the file you provided. I unzipped it okay and extracted a file called attachment.php. I opened it and there wasn't anything in it. Could you suggest a program with which I can open this attachment ? As far as the scripting goes, it seems i have a lot to learn about syntax and other things. Thanks again.<!--content-->Ooops, my bad. Here it is again.<!--content-->Thanks a lot guy. It was partly my fault. I'm using the new Mac OS, which is Unix based and I should have used my zip application to extract the file. Once I realized it was PK zip I knew which app to use. I'm going to study the changes you made and I'm going to work on being able to solve these javascript issues myself. it will take time and I'm sure I'll stumble here and there but I think I now see why it is better to know how to code HTML and javascript yourself rather than depend on HTML editors. Now I'm going to work on the other page where I have a script that creates a drop down menu with a text box underneath, When you select one of the options, the corresponding text should show up in the text book. Just a question: is this an onload or an onclick event?:cool:<!--content-->If after studying the source, you want me to explain a bit, I'll do that. Just let me know.<br />
<br />
Originally posted by licorne<br />
When you select one of the options, the corresponding text should show up in the text book. Just a question: is this an onload or an onclick event?OnClick<!--content-->
 
Back
Top