SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with target

    Hello

    I'm trying to use the set the target attribute in html from an <a> tag, something like this: <a href='test.html' target='test'> and then when i get to test I need some javscript to pull out this target name. Ive tried using window.location.target but it doesnt seem to work. any ideas??

    also, on this test.html there is some javascript to open a new window, like this: window.open('test2.xml', '', options) where options are just the properties of the new window (in this case setup for kiosk mode). What keeps happening is that when i click on the first link it doesnt open a new test.html because the page was set to the target but will open a new test2.html because the javascript seems to run????

    so what i think i need to do is go from the first page, open an intermediate page to open the next page in kiosk mode, and then keep only one instance of this page open. (to make matters slightly more complicated a user can have multiple instancs of the first page open so can open multiple instances of kiosk window but need to keep 1-1 relationship)

    any ideas??

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,117
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hello, and Welcome to Sitepoint

    I'm trying to use the set the target attribute in html from an <a> tag, something like this: <a href='test.html' target='test'> and then when i get to test I need some javscript to pull out this target name. Ive tried using window.location.target but it doesnt seem to work. any ideas??
    If you need to access an element in the page you can use:
    Code javascript:
    var element = document.getElementById('ID of element goes here');
    Then you can access the elements attributes by their names
    Code javascript:
    element.attributenamegoeshere;
    I can't really understand what you are wanting to know in your other questions..
    Can you post your complete code in [code ] tags


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
  •