Is there a way of doing this server-side?

Discussion in 'ASP General' started by Paul, Jul 22, 2005.

  1. Paul

    Paul Guest

    I use ASP and I need to know how to attaches an Iframe Id with its page so I
    can load menu options ( eg. 1.htm, 2.htm, 3.htm, ect...) into the Iframe
    from any given page on my website.
    The problem is for me that I cannot use _top because I am not always on the
    page that holds the Iframe in question ( page_iframe.htm ). that holds the
    Iframe ( Iframe001). I can load any given page into the iframe only when I
    am on ( page_frame.htm.)

    Now what if I am on index.asp and I have a menu with sub options. I want
    those sub options (eg, 1.htm, 2.htm, 3.htm..ect..) to load into Iframe001
    which is located on ( page_frame.htm ) How do we do that?

    Here is one idea but its client-side . Is there a better way to do it
    server-side?

    --------------Client side code----------------------------
    - From Menu -
    <a href="mainpage.asp?ifp=subpage.asp">Click</a>

    mainpage.asp -
    <%
    ifpsrccode="document.getElementbyid.Iframe001.src='" & request("ifp") & "'"
    %>
    <html>
    ....
    <body onload="<%=ifpsrccode%>">
    <iframe id=Iframe001 name=Iframe001></iframe>
    ....
    </html>
    --------------End of client side code----------------------

    Thanks in advance for reading this post. :)

    Paul
    Paul, Jul 22, 2005
    #1
    1. Advertising

  2. Paul

    Adrienne Guest

    Gazing into my crystal ball I observed "Paul"
    <> writing in
    news:1PZDe.5753$:

    > I use ASP and I need to know how to attaches an Iframe Id with its page
    > so I can load menu options ( eg. 1.htm, 2.htm, 3.htm, ect...) into the
    > Iframe from any given page on my website.


    <snip>

    I hate to say this, but, you need to rethink this unless you are working on
    an Intranet. Iframes have the same problems as regular frames (as you have
    discovered), and javascript navigation will fail for visitors without
    javascript enabled, like Google.


    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne, Jul 22, 2005
    #2
    1. Advertising

  3. Paul

    Paul Guest

    HI! I plan to use a javascript checker, and my content is 50% flash
    templates and other js script related templates.

    So the user will most probably have his/hers java enabled or will want
    too in order to preview the templates.

    Do you have any idea how I can use server code to do it?

    Paul

    *** Sent via Developersdex http://www.developersdex.com ***
    Paul, Jul 22, 2005
    #3
  4. Paul

    Adrienne Guest

    Gazing into my crystal ball I observed Paul <> writing
    in news::

    > HI! I plan to use a javascript checker, and my content is 50% flash
    > templates and other js script related templates.


    You can do preliminary checking client side. Do not depend on it, always
    validate server side.

    >
    > So the user will most probably have his/hers java enabled or will want
    > too in order to preview the templates.


    Why would the user have to have java enabled? Flash is not java, and
    javascript is certainly not java. Oh! You mean that the visitor is
    going to have to have javaSCRIPT enabled in order to preview the
    templates. That's not a wise idea. More and more people are disabling
    javascript to get away from nasty things, pop-ups, etc.

    A website should never be dependent on client side scripting. Using
    javascript to enhance the user's experience is one thing, dependency
    another.

    >
    > Do you have any idea how I can use server code to do it?
    >


    ASP know absolutely nothing about what is going on client side.


    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne, Jul 24, 2005
    #4
  5. Paul

    Paul Guest

    HI! yes flash does not need java enabled, what I meant was that the site
    that I am affiliated with uses scripting and I already found one item that
    gets blocked with Norton Internet Security Spam Blocker. all affiliates are
    sort of force to use it or they must use WebAPI to download all the
    templates for previewing. WebAPI is the preferred method of coarse. but not
    everyone knows how to use it. I for one.

    Since this is a commercial site selling products I figure that if I check
    for a blocker I can alert the user to allow scripting for the site or advise
    him that some functionality will be dis-abled and I can re-direct the user
    to another page.

    For now however I am using this method as it works,

    <%
    dim ifp
    ifp = Request.QueryString("ifp")
    if ifp <> "" then
    %>
    <iframe src=<%= ifp %> name="Iframe001" width="750px" height="920px"
    scrolling="yes" id="Iframe001">If you are reading this then your browser
    cannot view Iframe, Please upgrade you browser.</iframe>
    <% else %>
    <iframe src="defaultpage.htm" name="Iframe001" width="750px" height="920px"
    scrolling="yes" id="Iframe001">If you are reading this then your browser
    cannot view Iframe, Please upgrade you browser.</iframe>
    <% end if %>

    The only thing thought, I don't know how to do this in JavaScript. the only
    docs I read and help I got was in VB.


    Paul


    "Adrienne" <> wrote in message
    news:Xns969D1FFCBB0arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed Paul <> writing
    > in news::
    >
    >> HI! I plan to use a javascript checker, and my content is 50% flash
    >> templates and other js script related templates.

    >
    > You can do preliminary checking client side. Do not depend on it, always
    > validate server side.
    >
    >>
    >> So the user will most probably have his/hers java enabled or will want
    >> too in order to preview the templates.

    >
    > Why would the user have to have java enabled? Flash is not java, and
    > javascript is certainly not java. Oh! You mean that the visitor is
    > going to have to have javaSCRIPT enabled in order to preview the
    > templates. That's not a wise idea. More and more people are disabling
    > javascript to get away from nasty things, pop-ups, etc.
    >
    > A website should never be dependent on client side scripting. Using
    > javascript to enhance the user's experience is one thing, dependency
    > another.
    >
    >>
    >> Do you have any idea how I can use server code to do it?
    >>

    >
    > ASP know absolutely nothing about what is going on client side.
    >
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    Paul, Jul 24, 2005
    #5
  6. Paul

    Paul Guest

    Thanks for your comments, I will keep that in mind :)


    Paul

    "Adrienne" <> wrote in message
    news:Xns969D188772860arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed "Paul"
    > <> writing in
    > news::
    >
    >
    >> HI! yes flash does not need java enabled,

    >
    > Flash has absolutely _nothing_ to do with java. Java is a compiled
    > language, Flash is a browser plugin.
    >
    > what I meant was that the
    >> site that I am affiliated with uses scripting and I already found one
    >> item that gets blocked with Norton Internet Security Spam Blocker. all
    >> affiliates are sort of force to use it or they must use WebAPI to
    >> download all the templates for previewing. WebAPI is the preferred
    >> method of coarse. but not everyone knows how to use it. I for one.

    >
    > Do you have a URL? I've got to see this.
    >
    >>
    >> Since this is a commercial site selling products I figure that if I
    >> check for a blocker I can alert the user to allow scripting for the
    >> site or advise him that some functionality will be dis-abled and I can
    >> re-direct the user to another page.
    >>

    >
    > A commercial site that sells products must be especially aware of users
    > who
    > do not have client side scripting available, iframes enabled, flash
    > available, images enabled, etc. Checking for a blocker is the least of
    > your concerns.
    >
    >> For now however I am using this method as it works,
    >>
    >><%
    >> dim ifp
    >> ifp = Request.QueryString("ifp")
    >> if ifp <> "" then
    >> %>
    >><iframe src=<%= ifp %> name="Iframe001" width="750px" height="920px"
    >> scrolling="yes" id="Iframe001">If you are reading this then your
    >> browser cannot view Iframe, Please upgrade you browser.</iframe>
    >><% else %>
    >><iframe src="defaultpage.htm" name="Iframe001" width="750px"
    >>height="920px"
    >> scrolling="yes" id="Iframe001">If you are reading this then your
    >> browser cannot view Iframe, Please upgrade you browser.</iframe>
    >><% end if %>

    >
    > Jehosephat! I hate sites that tell me I have to upgrade my browser to see
    > something - I always leave and find what I want somewhere else.
    >
    > You know, your most important visitor is going to see that message as
    > well,
    > but Google can't do that.
    >
    >>
    >> The only thing thought, I don't know how to do this in JavaScript. the
    >> only docs I read and help I got was in VB.

    >
    > Then you need to post to a javascript group, comp.lang.javascript might be
    > a good place to start.
    >
    >>
    >>
    >> Paul
    >>
    >>
    >> "Adrienne" <> wrote in message
    >> news:Xns969D1FFCBB0arbpenyahoocom@207.115.63.158...
    >>> Gazing into my crystal ball I observed Paul <>
    >>> writing in news::
    >>>
    >>>> HI! I plan to use a javascript checker, and my content is 50% flash
    >>>> templates and other js script related templates.
    >>>
    >>> You can do preliminary checking client side. Do not depend on it,
    >>> always validate server side.
    >>>
    >>>>
    >>>> So the user will most probably have his/hers java enabled or will
    >>>> want too in order to preview the templates.
    >>>
    >>> Why would the user have to have java enabled? Flash is not java, and
    >>> javascript is certainly not java. Oh! You mean that the visitor is
    >>> going to have to have javaSCRIPT enabled in order to preview the
    >>> templates. That's not a wise idea. More and more people are
    >>> disabling javascript to get away from nasty things, pop-ups, etc.
    >>>
    >>> A website should never be dependent on client side scripting. Using
    >>> javascript to enhance the user's experience is one thing, dependency
    >>> another.
    >>>
    >>>>
    >>>> Do you have any idea how I can use server code to do it?
    >>>>
    >>>
    >>> ASP know absolutely nothing about what is going on client side.
    >>>
    >>>
    >>> --
    >>> Adrienne Boswell
    >>> http://www.cavalcade-of-coding.info
    >>> Please respond to the group so others can share

    >>
    >>
    >>

    >
    >
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    Paul, Jul 24, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael
    Replies:
    6
    Views:
    294
    Steven D'Aprano
    Jun 2, 2005
  2. David D
    Replies:
    1
    Views:
    332
    Adrienne Boswell
    Feb 28, 2007
  3. Peter Otten

    Re: Is there a better way of doing this?

    Peter Otten, Mar 6, 2009, in forum: Python
    Replies:
    7
    Views:
    245
    Tim Wintle
    Mar 8, 2009
  4. .nLL
    Replies:
    2
    Views:
    406
  5. Damjan Rems

    Is there a better way of doing this

    Damjan Rems, Apr 23, 2009, in forum: Ruby
    Replies:
    16
    Views:
    153
    Damjan Rems
    Apr 24, 2009
Loading...

Share This Page