What am I doing wrong here. Simple statement. Novice Question.
18 Message(s) by 8 Author(s) originally posted in java misc
| From: Paul |
Date: Saturday, July 23, 2005
|
HI! I get an
error with this
code .
<SCRIPT language ="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//-->
</SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly. so I need a way doing this. so I check to see if the ifp value is
null and if so then assign it a value. is this correct?Thanks in advance :)
Paul
| From: Joe Fawcett |
Date: Saturday, July 23, 2005
|
wrote in
message
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly. so I need a way doing this. so I check to see if the ifp value is
null and if so then assign it a value. is this correct?
Thanks in advance :)
Paul
As you do not
state the error I may wrong but if, as I
expect , it is "object
expected" then it's because you've a capital "I" in "If" which should be
lowercase:
if (ifp == "")
{
ifp = "default.htm";
}
In general all JAVAScript keywords start with lowercase letters,
built-in
objects such as "String" are one such
exception , and usually if two or more
words are concatenated all but the first have an uppercase first letter, e.g
"toLowerCase". An exception to this are the
operator s such as "typeof".
--
As a side
point , although in this
instance the
syntax is the same, JAVA and
JAVAScript are two different beasts and I suggest restricting your choice of
group s to the relevant ones.
Joe (MVP)
https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
| From: ASM |
Date: Saturday, July 23, 2005
|
wrote in message:
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly.
if(!(
parent .frames['myIframe'])
self.location="http//server.name/site.name/folder/default.html";
if main page does not have an iframe (or frame) nammed "myIframe"
then
load in same window the
file 'default.htm'
whom
path is "http//server.name/site.name/folder/"
or :
if(!(parent.frames['myIframe'])
top.location="http//server.name/site.name/folder/default.html";
if parent page does not have an iframe (or frame) nammed "myIframe"
then
load in main window the file 'default.htm'
whom path is "http//server.name/site.name/folder/"
so I need a way doing this. so I check to see if the ifp value is
null and if so then assign it a value. is this correct?
from where comes ifp (how does it get ist value) ?
what do you do with this value (after correction or not) ?--
Stephane Moriaux et son [moins] vieux Mac
| From: ASM |
Date: Saturday, July 23, 2005
|
wrote in message:
if(!(parent.frames['myIframe'])
if(!(parent.frames['myIframe']))
or :
if(!(parent.frames['myIframe'])
if(!(parent.frames['myIframe']))
--
Stephane Moriaux et son [moins] vieux Mac
| From: Paul |
Date: Saturday, July 23, 2005
|
Hi! and thanks for responding. basically I've a
menu with sub-menu
option s
which are htm file to go into an iframe.
I need it to be so I can do this from any page in my site. this is why I
need a script to pass the value.
In my menu I use the following code to send the sub-menu options.
Sub-menu option 1: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file1_for_iframes.htm
Sub-menu option 2: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file2_for_iframe.htm
Now for the MainIframepage.asp file I created the following Iframe like
this---and it works fine.
<iframe src="<%=Request.QueryString("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>
Now the problem is for me is what happens if someone enters the page without
clicking an sub-option. ( Like for instance, coming from a
bookmark OR if
the
session times out.) he'll get an empty Iframe.
That's what I need the default value for. :) How can I accomplish this?
Paul
wrote in message:
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//-->
</SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly.
if(!(parent.frames['myIframe'])
self.location="http//server.name/site.name/folder/default.html";
if main page does not have an iframe (or frame) nammed "myIframe"
then
load in same window the file 'default.htm'
whom path is "http//server.name/site.name/folder/"
or :
if(!(parent.frames['myIframe'])
top.location="http//server.name/site.name/folder/default.html";
if parent page does not have an iframe (or frame) nammed "myIframe"
then
load in main window the file 'default.htm'
whom path is "http//server.name/site.name/folder/"
so I need a way doing this. so I check to see if the ifp value is null
and if so then assign it a value. is this correct?
from where comes ifp (how does it get ist value) ?
what do you do with this value (after correction or not) ?
--
> Stephane Moriaux et son [moins] vieux Mac
| From: Richard Cornford |
Date: Saturday, July 23, 2005
|
wrote in message:
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
<snip>
... . so I check to see if the ifp
value is null ...
<snip>
The
algorithm for the type-converting comparison operator - == - (ECMA
262 3rd edition; section 11.9.3) doesn't allow any
string value
(including the empty string) to equal null. So whatever you are
attempting you aren't seeing if ifp is null.
Richard.
| From: Paul |
Date: Saturday, July 23, 2005
|
HI! thanks, I saw that little one after I posted it. but there is still a
problem. and the other post answered that one.
Do you know of another way to do it. ( other than converting the string and
then back again )?
Thanks in advance :)
Paul
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly. so I need a way doing this. so I check to see if the ifp value
is null and if so then assign it a value. is this correct?
Thanks in advance :)
Paul
As you do not state the error I may wrong but if, as I expect, it is
"object expected" then it's because you've a capital "I" in "If" which
should be lowercase:
if (ifp == "")
{
ifp = "default.htm";
}
In general all JAVAScript keywords start with lowercase letters, built-in
objects such as "String" are one such exception, and usually if two or
more words are concatenated all but the first have an uppercase first
letter, e.g "toLowerCase". An exception to this are the operators such as
"typeof".
--
As a side point, although in this instance the syntax is the same, JAVA
and JAVAScript are two different beasts and I suggest restricting your
choice of groups to the relevant ones.
Joe (MVP)
https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
>
| From: ASM |
Date: Saturday, July 23, 2005
|
wrote in message:
Hi! and thanks for responding. basically I've a menu with sub-menu options
which are htm file to go into an iframe.
sub-menu by options from a select ?
because if it is by JS, basicaly,
the main menu must send a page with sub-menus
link ed in it
I need it to be so I can do this from any page in my site. this is why I
need a script to pass the value.
In my menu I use the following code to send the sub-menu options.
Sub-menu option 1: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file1_for_iframes.htm
and ? where is the problem ? it is basic html ...
<form action="MainIframepage.asp" target="Iframe001" method ="get">
<select name="ifp">
<option selected="selected"
value="Template_Code_Files/default_menu.htm">Main Menu
</option>
<option
value="Template_Code_Files/file1_for_iframe.htm">sub-menu 1
</option>
<option
value="Template_Code_Files/file2_for_iframe.htm">sub-menu 2
</option>
</select>
<input type="submit" value="GO">
</form>
Now for the MainIframepage.asp file I created the following Iframe like
this---and it works fine.
<iframe src="<%=Request.QueryString("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.
Sorry I am not to your orders !
If you want I pay a
visit to your site
please give me a page I can read !
That't to say insert betwen tags of iframe a link to the plan of site
with links in basic html sending in self window.
Your way of doing is a
real expression of incorrection and unpoliteness
</iframe>
Now the problem is for me is what happens if someone enters the page without
clicking an sub-option. ( Like for instance, coming from a bookmark OR if
the session times out.) he'll get an empty Iframe.
Don't understand :
- the link is on the page (even in an option of select)
- the mechanism of send is in the browser
If there is a question of time spent on site it is the
job of your asp :
time out or time unexisting ?
hop ! go to page default
and ... I know anything about asp.
your [Request.QueryString("ifp")] has to enquiry if 'ifp' exists
if not : hop -> default page
if it is : hop ! what is
write in url (remenber : target="Iframe001")
as I know anything in asp
I would've given the default page to the src of iframe
<iframe src="default.htm" name="Iframe001" width="750px" blah>
Activing menu will send a page to the iframe with
variable ifp to obey
The querry about ifp and its different answeres would've to be in your
"MainIframepage.asp"
Is there not a ng for asp ?
--
Stephane Moriaux et son [moins] vieux Mac
| From: Paul |
Date: Saturday, July 23, 2005
|
Hi! Thanks for responding.
I wanted to use JS for
ASP . I am a beginner in JS and ASP. I can here
because I needed to know JS.
I've narrowed it
down bit more as I've being reading all day but I am
still of coarse shaky, so please bare with me.
Here's where I am at now. I am
testing this page.. and please tell me where
I am going wrong.
If you view this page the var ifp gets written out on
screen ( so its not
empty ) but it doesn't work in the Request.Query and I do not know why.
this is really puzzling me. I've being at this all day. I know its a
string as Its being displayed on screen. and Request.QueryString works when
I pass the value from another page. why does it not
accept the value that I
have declared?
<%@xxxxxxxxxxx="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Test Page
</title>
<script language="JAVAScript">
var
ifp="
http://www.webcandesign.com/Without_fl/html/Premium_Templates_test.asp?ifp=http://office.microsoft.com/en-us/default.aspx";
if (typeof(ifp) == "undefined"){
document.write ("Type of x is undefined");}
else{
document.write (ifp);}
</script>
</head>
</html>
<body>
<iframe src="<%=Request.QueryString("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>
</body>
</html>Ps. I hope I didn't come off being
rude before by using Capitals letters, I
sometimes use it to point out things so that it doesn't get overlooked. I
will try to keep away from using that method :)
wrote in message:
Hi! and thanks for responding. basically I've a menu with sub-menu
options which are htm file to go into an iframe.
sub-menu by options from a select ?
because if it is by JS, basicaly,
the main menu must send a page with sub-menus linked in it
I need it to be so I can do this from any page in my site. this is why I
need a script to pass the value.
In my menu I use the following code to send the sub-menu options.
Sub-menu option 1: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file1_for_iframes.htm
and ? where is the problem ? it is basic html ...
<form action="MainIframepage.asp" target="Iframe001" method="get">
<select name="ifp">
<option selected="selected"
value="Template_Code_Files/default_menu.htm">Main Menu</option>
<option
value="Template_Code_Files/file1_for_iframe.htm">sub-menu 1</option>
<option
value="Template_Code_Files/file2_for_iframe.htm">sub-menu 2</option>
</select>
<input type="submit" value="GO">
</form>
Now for the MainIframepage.asp file I created the following Iframe like
this---and it works fine.
<iframe src="<%=Request.QueryString("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.
Sorry I am not to your orders !
If you want I pay a visit to your site
please give me a page I can read !
That't to say insert betwen tags of iframe a link to the plan of site with
links in basic html sending in self window.
Your way of doing is a real expression of incorrection and unpoliteness
</iframe>
Now the problem is for me is what happens if someone enters the page
without clicking an sub-option. ( Like for instance, coming from a
bookmark OR if the session times out.) he'll get an empty Iframe.
Don't understand :
- the link is on the page (even in an option of select)
- the mechanism of send is in the browser
If there is a question of time spent on site it is the job of your asp :
time out or time unexisting ? hop ! go to page default
and ... I know anything about asp.
your [Request.QueryString("ifp")] has to enquiry if 'ifp' exists
if not : hop -> default page
if it is : hop ! what is write in url (remenber : target="Iframe001")
as I know anything in asp
I would've given the default page to the src of iframe
<iframe src="default.htm" name="Iframe001" width="750px" blah>
Activing menu will send a page to the iframe with variable ifp to obey
The querry about ifp and its different answeres would've to be in your
"MainIframepage.asp"
Is there not a ng for asp ?
--
> Stephane Moriaux et son [moins] vieux Mac
| From: Paul |
Date: Saturday, July 23, 2005
|
Sorry about the above.. I made a small copy error.
<%@xxxxxxxxxxx="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Test Page
</title>
<script language="JAVAScript">
var
ifp="
http://office.microsoft.com/en-us/default.aspx";
if (typeof(ifp) == "undefined"){
document.write ("Type of x is undefined");}
else{
document.write (ifp);}
</script>
</head>
</html>
<body>
<iframe src="<%=Request.QueryString("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>
</body>
</html>--
Thanks in advance :)
Paul
Hi! Thanks for responding.
I wanted to use JS for ASP. I am a beginner in JS and ASP. I can here
because I needed to know JS.
I've narrowed it down bit more as I've being reading all day but I am
still of coarse shaky, so please bare with me.
Here's where I am at now. I am testing this page.. and please tell me
where I am going wrong.
If you view this page the var ifp gets written out on screen ( so its not
empty ) but it doesn't work in the Request.Query and I do not know why.
this is really puzzling me. I've being at this all day. I know its a
string as Its being displayed on screen. and Request.QueryString works
when I pass the value from another page. why does it not accept the value
that I've declared?
<%@xxxxxxxxxxx="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Test Page</title>
<script language="JAVAScript">
var
ifp="http://www.webcandesign.com/Without_fl/html/Premium_Templates_test.asp?ifp=http://office.microsoft.com/en-us/default.aspx";
if (typeof(ifp) == "undefined"){
document.write ("Type of x is undefined");}
else{
document.write (ifp);}
</script>
</head>
</html>
<body>
<iframe src="<%=Request.QueryString("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>
</body>
</html>
Ps. I hope I didn't come off being rude before by using Capitals letters,
I sometimes use it to point out things so that it doesn't get overlooked.
I'll try to keep away from using that method :)
Paul
wrote in message:
Hi! and thanks for responding. basically I've a menu with sub-menu
options which are htm file to go into an iframe.
sub-menu by options from a select ?
because if it is by JS, basicaly,
the main menu must send a page with sub-menus linked in it
I need it to be so I can do this from any page in my site. this is why I
need a script to pass the value.
In my menu I use the following code to send the sub-menu options.
Sub-menu option 1: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file1_for_iframes.htm
and ? where is the problem ? it is basic html ...
<form action="MainIframepage.asp" target="Iframe001" method="get">
<select name="ifp">
<option selected="selected"
value="Template_Code_Files/default_menu.htm">Main Menu</option>
<option
value="Template_Code_Files/file1_for_iframe.htm">sub-menu 1</option>
<option
value="Template_Code_Files/file2_for_iframe.htm">sub-menu 2</option>
</select>
<input type="submit" value="GO">
</form>
Now for the MainIframepage.asp file I created the following Iframe like
this---and it works fine.
<iframe src="<%=Request.QueryString("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.
Sorry I am not to your orders !
If you want I pay a visit to your site
please give me a page I can read !
That't to say insert betwen tags of iframe a link to the plan of site
with links in basic html sending in self window.
Your way of doing is a real expression of incorrection and unpoliteness
</iframe>
Now the problem is for me is what happens if someone enters the page
without clicking an sub-option. ( Like for instance, coming from a
bookmark OR if the session times out.) he'll get an empty Iframe.
Don't understand :
- the link is on the page (even in an option of select)
- the mechanism of send is in the browser
If there is a question of time spent on site it is the job of your asp :
time out or time unexisting ? hop ! go to page default
and ... I know anything about asp.
your [Request.QueryString("ifp")] has to enquiry if 'ifp' exists
if not : hop -> default page
if it is : hop ! what is write in url (remenber : target="Iframe001")
as I know anything in asp
I would've given the default page to the src of iframe
<iframe src="default.htm" name="Iframe001" width="750px" blah>
Activing menu will send a page to the iframe with variable ifp to obey
The querry about ifp and its different answeres would've to be in your
"MainIframepage.asp"
Is there not a ng for asp ?
--
Stephane Moriaux et son [moins] vieux Mac
>
| From: ASM |
Date: Saturday, July 23, 2005
|
wrote in message:
Hi! Thanks for responding.
I wanted to use JS for ASP. I am a beginner in JS and ASP. I can here
because I needed to know JS.
You can read posts to learn some JS
but, on my idea, you do not need it in this case.
what do you expect the Request.QueryString("ifp")
would do in src of iframe ? ==> nothing !
What asp
documentation teach to you on this ?
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/3c778166-4a3c-4eda-b7cd-bb8557fe2de0.asp>
<http://authors.aspalliance.com/aspxtreme/sys/web/httprequestclassquerystring.aspx>
<http://docs.sun.com/source/817-2514-10/Ch9_ASPBuiltIn44.html>
<http://docs.sun.com/source/817-2514-10/Ch9_ASPBuiltIn45.html>
<http://www.serverwatch.com/tutorials/article.php/2174391>did you try what I did give ?
(the menu in select of form with the associate iframe ?)
Last explanations :
In your home page the iframe has in its src a default page
Then you choice a menu (or not) and press
button [GO]
the form calls your page.asp
completed automaticly with ?ifp=page_of_menu.htm
and page.asp will be send (after calculs on server) to the iframe
the Query.String must be in your page.asp
this page.asp could look like :
<html>
<body>
<table>
<tr>
<th>Elément
</th>
<th>Valeur
</th>
</tr>
<%
For Each chaine In Request.QueryString
If Request.QueryString(chaine).Count > 1 Then
For
index = 1 To Request.QueryString(chaine).Count
Response.Write "
<tr><td><u>" & chaine & "(" & index _
& ")
</u></td><td><b>" _
& Request.QueryString(chaine)(index) _
& "
</b></td></tr>"
Next
Else
Response.Write "
<tr><td><u>" & chaine _
& "
</u></td><td><b>" _
& Request.QueryString(chaine) _
& "
</b></td></tr>"
End If
Next
%>
</table>
</body>
</html>
Here's where I am at now. I am testing this page.. and please tell me where
I am going wrong.
your are wrong in the use of Querry.String
If you view this page the var ifp gets written out on screen ( so its not
empty ) but it doesn't work in the Request.Query and I do not know why.
this is really puzzling me. I've being at this all day. I know its a
string as Its being displayed on screen. and Request.QueryString works when
I pass the value from another page. why does it not accept the value that I
have declared?
<%@xxxxxxxxxxx="JAVASCRIPT" CODEPAGE="1252"%>
that smells asp language no ?
<html>
<head>
<title>Test Page</title>
<script language="JAVAScript">
no :
<script type="text/JAVAscript">
var
ifp="http://www.webcandesign.com/Without_fl/html/Premium_Templates_test.asp?ifp=http://office.microsoft.com/en-us/default.aspx";
if (typeof(ifp) == "undefined"){
document.write ("Type of x is undefined");}
else{
document.write (ifp);}
if you give (by code, script) a value to ifp or
foo
and then, if you ask to write ifp or foo
ifp or foo will be written ... of course !
what matter is that about Querry.String ?
English isn't my maternal language but in most of computer languages
if you speak a little english you understand what they talk.
Querry = search, catch
String = termes, words, equality ... a group of caracteres
Where does Query.String works ?
on the url of the document where the querry does its job.
What is its job : to extract informations joined to the url
</script>
</head>
</html>
<body>
<iframe src="<%=Request.QueryString("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>
</body>
</html>
Ps. I hope I didn't come off being rude before by using Capitals letters, I
sometimes use it to point out things so that it doesn't get overlooked. I
will try to keep away from using that method :)
sawn nothing in this maner
exceptionaly I leave the copy of precedent post
that you can refere to it>
wrote in message:
Hi! and thanks for responding. basically I've a menu with sub-menu
options which are htm file to go into an iframe.
sub-menu by options from a select ?
because if it is by JS, basicaly,
the main menu must send a page with sub-menus linked in it
I need it to be so I can do this from any page in my site. this is why I
need a script to pass the value.
In my menu I use the following code to send the sub-menu options.
Sub-menu option 1: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file1_for_iframes.htm
and ? where is the problem ? it is basic html ...
<form action="MainIframepage.asp" target="Iframe001" method="get">
<select name="ifp">
<option selected="selected"
value="Template_Code_Files/default_menu.htm">Main Menu
</option>
<option
value="Template_Code_Files/file1_for_iframe.htm">sub-menu 1
</option>
<option
value="Template_Code_Files/file2_for_iframe.htm">sub-menu 2
</option>
</select>
<input type="submit" value="GO">
</form>
Now for the MainIframepage.asp file I created the following Iframe like
this---and it works fine.
<iframe src="<%=Request.QueryString("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.
Sorry I am not to your orders !
If you want I pay a visit to your site
please give me a page I can read !
That't to say insert betwen tags of iframe a link to the plan of site with
links in basic html sending in self window.
Your way of doing is a real expression of incorrection and unpoliteness
</iframe>
Now the problem is for me is what happens if someone enters the page
without clicking an sub-option. ( Like for instance, coming from a
bookmark OR if the session times out.) he'll get an empty Iframe.
>Don't understand :
- the link is on the page (even in an option of select)
- the mechanism of send is in the browser
If there is a question of time spent on site it is the job of your asp :
time out or time unexisting ? hop ! go to page default
and ... I know anything about asp.
your [Request.QueryString("ifp")] has to enquiry if 'ifp' exists
if not : hop -> default page
if it is : hop ! what is write in url (remenber : target="Iframe001")
as I know anything in asp
I would've given the default page to the src of iframe
<iframe src="default.htm" name="Iframe001" width="750px" blah>
Activing menu will send a page to the iframe with variable ifp to obey
The querry about ifp and its different answeres would've to be in your
"MainIframepage.asp"
Is there not a ng for asp ?
--
Stephane Moriaux et son [moins] vieux Mac
--
Stephane Moriaux et son [moins] vieux Mac
| From: ASM |
Date: Saturday, July 23, 2005
|
wrote in message:
Sorry about the above.. I made a small copy error.
no importance : answer is same as precedente
Learn use of Querry.String--
Stephane Moriaux et son [moins] vieux Mac
| From: Paul |
Date: Sunday, July 24, 2005
|
HI! Thanks allot for all your info. I'll look into the Request.QueryString
for closely. its a little hard for me now, I new to it. but I'll read on.
Once again, Thanks you :)
wrote in message:
Hi! Thanks for responding.
I wanted to use JS for ASP. I am a beginner in JS and ASP. I can here
because I needed to know JS.
You can read posts to learn some JS
but, on my idea, you do not need it in this case.
what do you expect the Request.QueryString("ifp")
would do in src of iframe ? ==> nothing !
What asp documentation teach to you on this ?
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/3c778166-4a3c-4eda-b7cd-bb8557fe2de0.asp>
<http://authors.aspalliance.com/aspxtreme/sys/web/httprequestclassquerystring.aspx>
<http://docs.sun.com/source/817-2514-10/Ch9_ASPBuiltIn44.html>
<http://docs.sun.com/source/817-2514-10/Ch9_ASPBuiltIn45.html>
<http://www.serverwatch.com/tutorials/article.php/2174391>
did you try what I did give ?
(the menu in select of form with the associate iframe ?)
Last explanations :
In your home page the iframe has in its src a default page
Then you choice a menu (or not) and press button [GO]
the form calls your page.asp
completed automaticly with ?ifp=page_of_menu.htm
and page.asp will be send (after calculs on server) to the iframe
the Query.String must be in your page.asp
this page.asp could look like :
<html>
<body>
<table>
<tr>
<th>Elément</th>
<th>Valeur</th>
</tr>
<%
For Each chaine In Request.QueryString
If Request.QueryString(chaine).Count > 1 Then
For index = 1 To Request.QueryString(chaine).Count
Response.Write "<tr><td><u>" & chaine & "(" & index _
& ") </u></td><td><b>" _
& Request.QueryString(chaine)(index) _
& "</b></td></tr>"
Next
Else
Response.Write "<tr><td><u>" & chaine _
& "</u></td><td><b>" _
& Request.QueryString(chaine) _
& "</b></td></tr>"
End If
Next
%>
</table>
</body>
</html>
Here's where I am at now. I am testing this page.. and please tell me
where I am going wrong.
your are wrong in the use of Querry.String
If you view this page the var ifp gets written out on screen ( so its not
empty ) but it doesn't work in the Request.Query and I do not know why.
this is really puzzling me. I've being at this all day. I know its a
string as Its being displayed on screen. and Request.QueryString works
when I pass the value from another page. why does it not accept the value
that I've declared?
<%@xxxxxxxxxxx="JAVASCRIPT" CODEPAGE="1252"%>
that smells asp language no ?
<html>
<head>
<title>Test Page</title>
<script language="JAVAScript">
no :
<script type="text/JAVAscript">
var
ifp="http://www.webcandesign.com/Without_fl/html/Premium_Templates_test.asp?ifp=http://office.microsoft.com/en-us/default.aspx";
if (typeof(ifp) == "undefined"){
document.write ("Type of x is undefined");}
else{
document.write (ifp);}
if you give (by code, script) a value to ifp or foo
and then, if you ask to write ifp or foo
ifp or foo will be written ... of course !
what matter is that about Querry.String ?
English isn't my maternal language but in most of computer languages
if you speak a little english you understand what they talk.
Querry = search, catch
String = termes, words, equality ... a group of caracteres
Where does Query.String works ?
on the url of the document where the querry does its job.
What is its job : to extract informations joined to the url
</script>
</head>
</html>
<body>
<iframe src="<%=Request.QueryString("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>
</body>
</html>
Ps. I hope I didn't come off being rude before by using Capitals
letters, I sometimes use it to point out things so that it doesn't get
overlooked. I'll try to keep away from using that method :)
sawn nothing in this maner
exceptionaly I leave the copy of precedent post
that you can refere to it
wrote in message:
Hi! and thanks for responding. basically I've a menu with sub-menu
options which are htm file to go into an iframe.
sub-menu by options from a select ?
because if it is by JS, basicaly,
the main menu must send a page with sub-menus linked in it
I need it to be so I can do this from any page in my site. this is why I
need a script to pass the value.
In my menu I use the following code to send the sub-menu options.
Sub-menu option 1: ( code below )
MainIframepage.asp?ifp=Template_Code_Files/file1_for_iframes.htm
and ? where is the problem ? it is basic html ...
<form action="MainIframepage.asp" target="Iframe001" method="get">
<select name="ifp">
<option selected="selected"
value="Template_Code_Files/default_menu.htm">Main Menu</option>
<option
value="Template_Code_Files/file1_for_iframe.htm">sub-menu 1</option>
<option
value="Template_Code_Files/file2_for_iframe.htm">sub-menu 2</option>
</select>
<input type="submit" value="GO">
</form>
Now for the MainIframepage.asp file I created the following Iframe like
this---and it works fine.
<iframe src="<%=Request.QueryString("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.
Sorry I am not to your orders !
If you want I pay a visit to your site
please give me a page I can read !
That't to say insert betwen tags of iframe a link to the plan of site
with links in basic html sending in self window.
Your way of doing is a real expression of incorrection and unpoliteness
</iframe>
Now the problem is for me is what happens if someone enters the page
without clicking an sub-option. ( Like for instance, coming from a
bookmark OR if the session times out.) he'll get an empty Iframe.
>Don't understand :
- the link is on the page (even in an option of select)
- the mechanism of send is in the browser
If there is a question of time spent on site it is the job of your asp :
time out or time unexisting ? hop ! go to page default
and ... I know anything about asp.
your [Request.QueryString("ifp")] has to enquiry if 'ifp' exists
if not : hop -> default page
if it is : hop ! what is write in url (remenber : target="Iframe001")
as I know anything in asp
I would've given the default page to the src of iframe
<iframe src="default.htm" name="Iframe001" width="750px" blah>
Activing menu will send a page to the iframe with variable ifp to obey
The querry about ifp and its different answeres would've to be in your
"MainIframepage.asp"
Is there not a ng for asp ?
--
Stephane Moriaux et son [moins] vieux Mac
--
> Stephane Moriaux et son [moins] vieux Mac
| From: Joe Fawcett |
Date: Sunday, July 24, 2005
|
wrote in message
HI! thanks, I saw that little one after I posted it. but there is still a
problem. and the other post answered that one.
Do you know of another way to do it. ( other than converting the string and
then back again )?
Thanks in advance :)
Paul
I'm not sure, if you want to test for null or empty string the have:
if (!ifp)
{
//ifp is null or empty
}--
Joe (MVP)
https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
| From: akarl |
Date: Monday, August 08, 2005
|
wrote in message:
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly. so I need a way doing this. so I check to see if the ifp value is
null and if so then assign it a value. is this correct?
comp.lang.JAVAscript
| From: Trevor L. |
Date: Monday, August 08, 2005
|
Hmm!
There have been a few posts on this topic (or related), including some I
have taken part in
One spelt out the different between:
a null string, tested by 'if (string == null)'
an empty string, tested by 'if (string == "")'
and
a string comprising a space, tested by 'if (string == " ")'
Your test is for an empty string. Is this what it should be?
You are testing if (ifp == ..). I haven't used iframes, so I do not know
whether this is the correct thing to be testing. Others may answer this.
With frames, I use this code
if (parent.location.href == window.location.href)
parent.location.href = "index.html"
I'd need to experiment to see what works with iframes. (Maybe I should,
to add to my
knowledge !)
--
Cheers,
Trevor L.
Website:
http://tandcl.homemail.com.au
wrote in message:
wrote in message:
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//-->
</SCRIPT>
Basicly I want my iframe to have a default page if the user enters in
directly. so I need a way doing this. so I check to see if the ifp
value is null and if so then assign it a value. is this correct?
> comp.lang.JAVAscript
| From: Dave Anderson |
Date: Tuesday, August 09, 2005
|
wrote in message:
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
You misspelled "if" (JAVAscript is case-sensitive).--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email
address implies consent to these terms. Please don't contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
| From: Jayme Pechan |
Date: Wednesday, August 31, 2005
|
Try:
<SCRIPT language="JAVAScript">
if (ifp=="")
{
ifp="default.htm";
}
</SCRIPT>
wrote in message:
HI! I get an error with this code.
<SCRIPT language="JAVAScript">
If (ifp==""){
ifp="default.htm"}
//--></SCRIPT>
You misspelled "if" (JAVAscript is case-sensitive).
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message.
Use
of this email address implies consent to these terms. Please don't
contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
>
Next Message: Hello World message disappeared?!
Blogs related to What am I doing wrong here. Simple statement. Novice Question.
motorcycle shop in maryland flash comedy movie career in ...
how to read an income
statement antique clothes doll ebay used barrel saddle for sale
... photo slide show
java script united health care dentist
... casino
novice poker industry insurance vendor 2 chapter kelly r video
...
This work is licensed under a Creative Commons Attribution-Non
Here's How to Get Your Answers Quick and Easy Click
Here ... This makes it easy to transfer information from their financial
statement ... Stopzilla, for example, is a very user friendly program constructed with the
novice user in mind.
...
Entertainment, Arts, Fashion & Technology
This release contains certain forward-looking
statements within the meaning of the
... JAVA, Linux and Windows Mobile than any other mobile games technology.
... to the
simple -- Las Momias, "We're the mummies,
here to serve the people.
...
Hexagon
She spoke the written word like a pro, and even made
doing so seem normal.
... Isaac eventually graduated from seminary school and became a
novice priest.
... Anyway, next we have a local legend
here at The
Java Pot, everybody give it
...
The Hack FAQ
Here's Simple Nomad's GPG key (also available from MIT's key server):
... Sure, the URL might not look right, but you can use
Java to control that.
... However it is probably too much program for the
novice script kiddie.
...
Worlds Largest Interview Blog
I
am a year younger than Geoffrey (I don't remember this
statement but it is false.) Answer:
... Here is a
simple mathematical puzzle set by Longfellow in his own flowery,
... 419 The
Novice hockey tournaments are on for beginners.
...