Where can I find this javascript and some html questions.

Sharky Forums


Results 1 to 5 of 5

Thread: Where can I find this javascript and some html questions.

  1. #1
    Hammerhead Shark Sgt_Strider's Avatar
    Join Date
    Feb 2002
    Location
    Vancouver, B.C, Canada
    Posts
    2,082

    Where can I find this javascript and some html questions.

    I can't seem to find a confirm/cancel script that redirects the person to another site should he click cancel. The one that I have involves working with the history and so I was wondering if someone can create one for me or lead me to a site that have something like that. Second question involves tables. How do I get rid of the cell borders inside the table? Like get rid of those lines that separates the rows...Thx

  2. #2
    Hammerhead Shark e_dawg's Avatar
    Join Date
    Jan 2001
    Location
    Earth, Western Hemisphere, North America, US, UT, SLC
    Posts
    2,628
    It is a button with javascript on the onclick event usually, but you could also use two links... Why is it so hard?

    Table:
    border=0
    You may also want cellspacing=0 and/or cellpadding=0...

  3. #3
    Hammerhead Shark Sgt_Strider's Avatar
    Join Date
    Feb 2002
    Location
    Vancouver, B.C, Canada
    Posts
    2,082
    sorry man but I don't have a clue in what you're talking about. I'm pretty much a big noob in html but getting the hang of using dreamweaver 4 .

  4. #4
    Catfish
    Join Date
    Jul 2001
    Location
    uk
    Posts
    235
    the html / table thing:

    within the table tag itself - the <table> bit - make sure you have specified that the 'border' property is set to '0' eg:

    <table border="0">
    <tr>
    <td>

    and so on...

    you may also want to set the 'cellspacing' and 'cellpadding' properties to '0' in the same manner.

    the javascript thing:

    it sounds like all you want to do is send people to a specific location when they click on your cancel button...

    if that's the case then you could always wrap any image you are using for the cancel button in an href tag eg:

    <a href="http://www.sharkyforums.com" target="_blank"><img src="images/cancel_button.gif" border="0"></a>

    just change the url to whatever you want (whether it is another page on the same site or another web site completely), set the 'target' property as required - '_blank' opens a new window and loads the new page into it, '_self' will overwrite the current page with the new one.(there are other options for that but i figure those should do for what you have described...). you will also need to make sure the image is referenced accurately and set the border to '0' when wrapping an image in an href to avoid the nasty, default highlight.

    if you aren't using an image but an actual button (proper form element) then you will have to either write a function that is called when someone clicks the button or if it's simple enough just add it to the onclick event itself. i'm not sure what you actually need though so hopefully the above will do.

    just put 'javascript scripts tutorials' into google and hit search - that should bring you back plenty of good stuff.

    good luck.
    "no-one's ugly after 2 a.m."[buk.]

  5. #5
    Hammerhead Shark Sgt_Strider's Avatar
    Join Date
    Feb 2002
    Location
    Vancouver, B.C, Canada
    Posts
    2,082
    alright, thx alot man .

Posting Permissions

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