Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Is there a way of doing this server-side?

Reply
Thread Tools

Is there a way of doing this server-side?

 
 
Paul
Guest
Posts: n/a
 
      07-22-2005
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



 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      07-22-2005
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
 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      07-22-2005
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 ***
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      07-24-2005
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
 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      07-24-2005
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



 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      07-24-2005
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there short way of doing this? .nLL ASP .Net 2 05-30-2009 02:15 PM
Is there a better way of doing this Damjan Rems Ruby 16 04-24-2009 11:38 AM
Re: Is there a better way of doing this? Peter Otten Python 7 03-08-2009 07:02 AM
Is there an easy or Automatic way of doing RSS feeds creation? David D HTML 1 02-28-2007 04:46 AM
Is there a better way of doing this? Michael Python 6 06-02-2005 03:52 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57