Yeah, I hear ya. Basically, as a general programming practice, if I am only going to use a single command, I will do it that way to prevent additional lines of code.
----------------------------------------------------------------- J a m e s B. S w a r t Agere Systems - Colorado Design Centers Unix/Windows Systems Administrator, WAN, LAN, Desktop, Voice, Printers, Security Focal Point, & Local CIO Service Delivery Manager Contact VOICE: 720-494-2330 � FAX: 720-494-2331 -----Original Message----- From: Mark Currie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 6:45 PM To: [EMAIL PROTECTED] Subject: Re: Is "onClick" a bad way to navigate using buttons? yeah... I suppose you could do that. ;) I had suggest the function way, assuming that there would probably be more javascript used somewhere in the page. I'm fairly new to JSP, so I'm still in the heavy javascripting mode... Mark ----- Original Message ----- From: "Swart, James (Jim) ** CTR **" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 05, 2001 7:32 PM Subject: Re: Is "onClick" a bad way to navigate using buttons? Of course, you could also do this: <input type="button" name=butNewSearch value="New Search" onclick="javascript:window.location="SearchPage.jsp";"> ----------------------------------------------------------------- J a m e s B. S w a r t Agere Systems - Colorado Design Centers Unix/Windows Systems Administrator, WAN, LAN, Desktop, Voice, Printers, Security Focal Point, & Local CIO Service Delivery Manager Contact VOICE: 720-494-2330 � FAX: 720-494-2331 -----Original Message----- From: Mark Currie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: Re: Is "onClick" a bad way to navigate using buttons? Onclick works fine... the problem with the second button is that it should be written like: <input type="button" name=butNewSearch value="New Search" onclick="somesortoffunctionhere()"> <script> function somesortoffunctionhere() { window.location="SearchPage.jsp"; } </script> That should work? Mark Currie ----- Original Message ----- From: "Michael Pomeroy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 05, 2001 2:20 PM Subject: Is "onClick" a bad way to navigate using buttons? > I have a Results form which displays result records. Then, when a SUBMIT button is hit, a Detail page is displayed. > > I added two more buttons within the Results form, one to go back one step in history: > <input type="button" name=butModifySearch value="Modify Search" onclick="window.history.go(-1)"> > AND, > a second button to perform a new search: > <input type="button" name=butNewSearch value="New Search" link.onclick=("SearchPage.jsp")> > > I am receiving a run-time error for the "New Search" button, but the history button is working well. > > I have two questions: > 1)What is wrong with the "New Search" button? > 2)Are there browser bugs which make "onClick" a bad technique to use to navigate pages? > 3)Are there better techniques to use to navigate with buttons? > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ========================= To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
