Is there a way of doing this server-side?

P

Paul

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
 
A

Adrienne

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.
 
P

Paul

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
 
A

Adrienne

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.
 
P

Paul

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
 
P

Paul

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


Paul

Adrienne said:
Gazing into my crystal ball I observed "Paul"
<[email protected]> writing in

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top