SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    target="_parent" ?

    hi,
    im building an accessible website and it all validates. i have a scrollable text object on my page:

    <object type="text/html" data="newsInline.asp" id="newsPanel" title="news">
    <a href="news.asp">Read latest news articles.</a>
    </object>

    within the newsInline.asp will be snippets of news articals with a "click here for more" link. when i click on that link, the page shows within the scrollable pane! the target attribute (which wont validate anyway) doesnt work. could i use javascript instead (what if the user has it turned off). how can i do this so that when a user clicks on that link, it displays it in the main borwser window and not the scrollable pane?
    thanks

  2. #2
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If all you want is the effect of a scrollarea, include the function right into your page instead of using an object.
    Code:
    <div style=id="newsPanel">[include asp file here]</div>
    Not sure what you're style is but you can use the overflow property in CSS.
    Code:
    #newPanel {
    height: 300px;
    width: 150px;
    overflow: auto;
    }
    This way you don't have to mess around with objects.

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use JavaScript for this, since target is still part of the DOM. In the HTML though, I would use the rel="" attribute, with a custom value inside the quotation marks (something like parent, for example) and then let the script use that as a hook.

    Sitepoint has an article on opening new windows with JavaScript and the rel attribute.

    Let me dig it up for you, ok?

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couldn't find the article on Sitepoint, so I went to accessify.com and found a copy of the script.

    http://accessify.com/features/tutori...perfect-popup/

    Edit: Found it.

    http://www.sitepoint.com/article/sta...ompliant-world

    For your case, just be sure to change the value of target from blank to parent.

  5. #5
    SitePoint Evangelist
    Join Date
    Jul 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks guys, very helpful (as always!).
    - gBay


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
  •