saleemkhan
asked on
javascript problem
hello experts,
I created one navigartor in that navigator one hotspot button on this.when i click on the hotspot i wrote
a formula
http://abc/ab.nsf/test?openform
i put the target=_blank so its opening in a new window.
this is working fine.
Now the problem is if the user minimizes and again click on hotspot button it will work but user has to manually maximise.
To solve this problem i wrote javascript
like this
<script language="javascript">
var the_window = null;
function test()
{
if(!the_window || the_window .closed)
{
the_window = window.open("http://abc/abcs.nsf","http://abc/abcsTes.nsf/child?openform","left=3, top=2, width=5,height=6,toolbar=0 ,resizable =0,scrollb ars=0,stat us=0,menub ar=0,direc tories=0,l ocation=0" );
return false;
}
else
{
the_window.focus();
}
}
<a href='http://abc/abcTes.nsf/child?openform' ;onclick='test();return false';' target='_blank' >SHAIK </A>
if user clicks on a button it should open a new window if the new window is minimized again it should open the newwindow.
can anybody will help me.
saleem.
I created one navigartor in that navigator one hotspot button on this.when i click on the hotspot i wrote
a formula
http://abc/ab.nsf/test?openform
i put the target=_blank so its opening in a new window.
this is working fine.
Now the problem is if the user minimizes and again click on hotspot button it will work but user has to manually maximise.
To solve this problem i wrote javascript
like this
<script language="javascript">
var the_window = null;
function test()
{
if(!the_window || the_window .closed)
{
the_window = window.open("http://abc/abcs.nsf","http://abc/abcsTes.nsf/child?openform","left=3,
return false;
}
else
{
the_window.focus();
}
}
<a href='http://abc/abcTes.nsf/child?openform' ;onclick='test();return false';' target='_blank' >SHAIK </A>
if user clicks on a button it should open a new window if the new window is minimized again it should open the newwindow.
can anybody will help me.
saleem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you see the blank in: the_window .closed
why does this work? ;-)
...anyway: great!
why does this work? ;-)
...anyway: great!
ASKER
hello zvonko,
I did the same thing but its not working.
i have first form the url of this say
http://abc/Main.form?openform when i open this form in the broweser when i click on the button
it should open the child form in a new window if the child window is minimized once again if i click on the mainform button it should open me the child window.
i have a doubt in window.open('','')
1.what i have to pass in first parameter the url of the form to be opened(child) or the url of the current form(parent)
2.Is title should be same as the url or full form name anything we can give.
waiting for reply
saleem
I did the same thing but its not working.
i have first form the url of this say
http://abc/Main.form?openform when i open this form in the broweser when i click on the button
it should open the child form in a new window if the child window is minimized once again if i click on the mainform button it should open me the child window.
i have a doubt in window.open('','')
1.what i have to pass in first parameter the url of the form to be opened(child) or the url of the current form(parent)
2.Is title should be same as the url or full form name anything we can give.
waiting for reply
saleem
to 1.) first parameter is the URL of the page to open.
to 2.) title is not used. You set the title of the new page in <TITLE> (or in the Notes form ;-))
but look again at my last comment. It is realy tested for working as desired...
to 2.) title is not used. You set the title of the new page in <TITLE> (or in the Notes form ;-))
but look again at my last comment. It is realy tested for working as desired...
ASKER
This is my code.But its not opening the child page.
<script language="javascript">
var the_window = null;
function test()
{
if(!the_window || the_window .closed)
{
the_window = window.open('http://abc/retTest.nsf/childForm?openform','tie','left=30,top=200, width=5,height=6,toolbar=0 ,resizable =0,scrollb ars=0,stat us=0,menub ar=0,direc tories=0,l ocation=0' );
return false;
}
else
{
the_window.focus();
}
}
</script>
<input type=button onclick="test" value="new">
so when i click on new button it should open the child form but its not doing that.
waiting for reply.
saleem.
<script language="javascript">
var the_window = null;
function test()
{
if(!the_window || the_window .closed)
{
the_window = window.open('http://abc/retTest.nsf/childForm?openform','tie','left=30,top=200, width=5,height=6,toolbar=0
return false;
}
else
{
the_window.focus();
}
}
</script>
<input type=button onclick="test" value="new">
so when i click on new button it should open the child form but its not doing that.
waiting for reply.
saleem.
you missed the () in function call ;-)
<input type=button onclick="test()" value="new">
good luck,
zvonko
<input type=button onclick="test()" value="new">
good luck,
zvonko
ASKER
Thanks zvonko,
sorry to do such a small mistakes.i will accept ur comment but a little more help i think u can.Here i am increasing points to 50.
The same example i have to implement in frameset.
1.i have a frameset.
2.i have one navigator.
3.in navigator i have 6 Ellipse buttons.
4.when i click on 1st button it should open one form in a new window.
5.By mistake if the user minimizes it should be opened with size as u already gave the example.
i tried to put the code in the navigator but unable to how to implement the same code when a user click on ellipse.
how can u we do it.
saleem.
Sorry saleem,
but even for 300 points I have no idea how to embed JavaScript in navigator, 'cose it is all one big gif generated by Domino (and alse the <MAP> and onClick events in it).
The only idea I would have is to take this generated gif (and the html code) and transform it into ImageResources and html passtru page, and then embed this JavaScript calls you need.
But this all is a total change and up to you if you like to go in this direction.
Was my idea understundable to you?
but even for 300 points I have no idea how to embed JavaScript in navigator, 'cose it is all one big gif generated by Domino (and alse the <MAP> and onClick events in it).
The only idea I would have is to take this generated gif (and the html code) and transform it into ImageResources and html passtru page, and then embed this JavaScript calls you need.
But this all is a total change and up to you if you like to go in this direction.
Was my idea understundable to you?
ASKER
Thanks Zvonko
Hello saleem,
thank you for the points ;-)
But I would be interested in the feedback: did you realise my proposal to embad the a copy of html produced by the navigator into a Notes page?
...by the way: you need not to import the navigator gif/jpg; only the navigator html.
thank you for the points ;-)
But I would be interested in the feedback: did you realise my proposal to embad the a copy of html produced by the navigator into a Notes page?
...by the way: you need not to import the navigator gif/jpg; only the navigator html.
ASKER
thats i didnt understand.u said if i gave 300 points also it is somewhat complicated.thats why i left.
if u help me in that how it see the navigator html or how to proceed.
i know just created a navigator in open browser then view source.
any other way.
if u help me in that how it see the navigator html or how to proceed.
i know just created a navigator in open browser then view source.
any other way.
no other way. exact wath I mean.
Now, cut and paste this html into a Notes page.
Mark the page property: "TreatPageContentsAsHtml"
In place where you embedet the navigator embed the created page. Test for the correct cals. For first nothing changed. You should see the same navigator like without the page. BUT now you can modificate the navigator html code!!! (You see ;-))
(...in any case I have nothing against extra points <|;-))
Now, cut and paste this html into a Notes page.
Mark the page property: "TreatPageContentsAsHtml"
In place where you embedet the navigator embed the created page. Test for the correct cals. For first nothing changed. You should see the same navigator like without the page. BUT now you can modificate the navigator html code!!! (You see ;-))
(...in any case I have nothing against extra points <|;-))
ASKER
hello zovnko,
Thans very much for ur kind response.As per ur hint i tried its working but its creating the button as well as the hotspot button.
if i click on hotspot button it going to mail file working fine.if it is minimized i have to click on the java script button(new) which u helped me.
so what i want is i want to click on only one button if its is mimized it should be maximized if its max it should be like that.
so here is the code just check and help me.
<HTML>
<!-- Lotus-Domino (Release 5.0.8 - June 18, 2001 on Windows NT/Intel) -->
<HEAD>
<BASE TARGET="saleem"><TITLE>Nav Main</TITL E>
<SCRIPT LANGUAGE="JavaScript">
<!--
document._domino_target = "saleem";
function _doClick(v, o, t) {
var url="/QnetTest.nsf/NavMain ?OpenNavig ator&BaseT arget=sale em&Click=" + v;
if (o.href != null)
o.href = url;
else {
if (t == null)
t = document._domino_target;
window.open(url, t);
}
}
// -->
</SCRIPT>
</HEAD>
<BODY TEXT="000000" BGCOLOR="FFFFFF">
<MAP NAME="132.map">
<AREA HREF="http://saleem/QnetTest.nsf?logout" SHAPE=rect COORDS="25,305,139,338">
<AREA HREF="http://saleem/QnetTest.nsf/saleemloginfax?openagent" SHAPE=rect COORDS="19,268,133,301">
<AREA HREF="http://saleem/stcenter.nsf" SHAPE=rect COORDS="19,232,133,265">
<AREA HREF="http://saleem/stcenter.nsf" SHAPE=rect COORDS="16,199,130,232">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmailloginNotebook?openagent" SHAPE=rect COORDS="14,164,128,197">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmaillogincontact?openagent" SHAPE=rect COORDS="14,130,128,163">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmailloginTodo?openagent" SHAPE=rect COORDS="14,96,128,129">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmaillogincal?openagent" SHAPE=rect COORDS="14,62,128,95">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmaillogin?openagent" SHAPE=rect COORDS="16,25,130,58"></MA P>
<A HREF="/QnetTest.nsf/031ee1 9749b05e3b 43256a8a00 4bf051?Ope nNavigator "><IMG SRC="/QnetTest.nsf/031ee19 749b05e3b4 3256a8a004 bf051/$Nav Imagemap/0 .52?OpenEl ement&Fiel dElemForma t=gif" WIDTH=140 HEIGHT=339 USEMAP="#132.map" BORDER=0 ISMAP></A></BODY>
</HTML>
<script language="javascript">
var the_window = null;
function test()
{
if(!the_window || the_window .closed)
{
the_window = window.open('http://saleem/QnetTest.nsf/saleemmaillogin?openagent','tie','left=30,top=200, width=500,height=600,toolb ar=0,resiz able=0,scr ollbars=0, status=0,m enubar=0,d irectories =0,locatio n=0');
return false;
}
else
{
the_window.focus();
}
}
</script>
<input type=button onclick="test()" value="new">
can u help me.i think i have done a small mistake as i did last time.
waiting for reply.
saleem.
Thans very much for ur kind response.As per ur hint i tried its working but its creating the button as well as the hotspot button.
if i click on hotspot button it going to mail file working fine.if it is minimized i have to click on the java script button(new) which u helped me.
so what i want is i want to click on only one button if its is mimized it should be maximized if its max it should be like that.
so here is the code just check and help me.
<HTML>
<!-- Lotus-Domino (Release 5.0.8 - June 18, 2001 on Windows NT/Intel) -->
<HEAD>
<BASE TARGET="saleem"><TITLE>Nav
<SCRIPT LANGUAGE="JavaScript">
<!--
document._domino_target = "saleem";
function _doClick(v, o, t) {
var url="/QnetTest.nsf/NavMain
if (o.href != null)
o.href = url;
else {
if (t == null)
t = document._domino_target;
window.open(url, t);
}
}
// -->
</SCRIPT>
</HEAD>
<BODY TEXT="000000" BGCOLOR="FFFFFF">
<MAP NAME="132.map">
<AREA HREF="http://saleem/QnetTest.nsf?logout" SHAPE=rect COORDS="25,305,139,338">
<AREA HREF="http://saleem/QnetTest.nsf/saleemloginfax?openagent" SHAPE=rect COORDS="19,268,133,301">
<AREA HREF="http://saleem/stcenter.nsf" SHAPE=rect COORDS="19,232,133,265">
<AREA HREF="http://saleem/stcenter.nsf" SHAPE=rect COORDS="16,199,130,232">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmailloginNotebook?openagent" SHAPE=rect COORDS="14,164,128,197">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmaillogincontact?openagent" SHAPE=rect COORDS="14,130,128,163">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmailloginTodo?openagent" SHAPE=rect COORDS="14,96,128,129">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmaillogincal?openagent" SHAPE=rect COORDS="14,62,128,95">
<AREA HREF="http://saleem/QnetTest.nsf/saleemmaillogin?openagent" SHAPE=rect COORDS="16,25,130,58"></MA
<A HREF="/QnetTest.nsf/031ee1
</HTML>
<script language="javascript">
var the_window = null;
function test()
{
if(!the_window || the_window .closed)
{
the_window = window.open('http://saleem/QnetTest.nsf/saleemmaillogin?openagent','tie','left=30,top=200, width=500,height=600,toolb
return false;
}
else
{
the_window.focus();
}
}
</script>
<input type=button onclick="test()" value="new">
can u help me.i think i have done a small mistake as i did last time.
waiting for reply.
saleem.
Sorry saleem,
I have not seen you last post here.
Have you solved this on your own, or do you need some support?
Regards,
zvonko
I have not seen you last post here.
Have you solved this on your own, or do you need some support?
Regards,
zvonko
this is a genial trick!!! It works!
The only error you made: the secon parameter in window.open is the window title (not very important).
Put the ?openForm string as first parameter (the URL ) and you will see it working!!!
Good luck,
zvonko
PS: my test was also without this "<A>" tag. I used simple button, like this:
<INPUT TYPE=button onClick="test()" VALUE=" New ">
You need no target, because window.open() is allways standalone window...