SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Threaded View

  1. #1
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Basic question about form action

    Being a JS novice, I have a simple question. Validation flags the following code:

    Code:
    <form>
    <input type="button" style="background-color: #00ccff" value="Home Page"
    onclick="window.location.href='index.html'">
    <input type="button" style="BACKGROUND-COLOR: #00ccff" value="Top of Page"
    onclick="window.location.href='#top'">
    </form>
    The form lacks a proper action attribute. What would be the proper one for this?

    And let me ask the same question about this JS code:

    Code:
    <form>
      <select>
        <option selected>Select a page</option>
    	<option value="#1897">1897-1902</option>
             ......
      </select>
      <input type="button" value="Go" onClick="jumpBox(this.form.elements[0])">
    </form>
    Note: this is, of course, client-side and not server-side.
    Last edited by Black Max; May 27, 2007 at 16:54.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •