Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Anyway loading the page without showing it?

Reply
Thread Tools

Anyway loading the page without showing it?

 
 
benny
Guest
Posts: n/a
 
      10-12-2004
Hi,

I have a web pageA, that include the javascript, to do some onload
event so that it would load another web pageB to perform some onload
action.
Could I able to load the pageB without showing it ? Or while loading
pageA I would load the pageB onload event using javascript?
I have one method i.e. <body onload="window.open("www.try.com",
height=0, ... )>
but once I have popup-blocker on browser I wont be able to achive that
action.
Anyone could give me suggestion ?

regards

benny
 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      10-12-2004
benny wrote:

> Hi,
>
> I have a web pageA, that include the javascript, to do some onload
> event so that it would load another web pageB to perform some onload
> action.
> Could I able to load the pageB without showing it ? Or while loading
> pageA I would load the pageB onload event using javascript?
> I have one method i.e. <body onload="window.open("www.try.com",
> height=0, ... )>
> but once I have popup-blocker on browser I wont be able to achive that
> action.
> Anyone could give me suggestion ?


Load PageB in a hidden IFrame.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
 
 
 
Fred Oz
Guest
Posts: n/a
 
      10-12-2004
benny wrote:

> Hi,
>
> I have a web pageA, that include the javascript, to do some onload
> event so that it would load another web pageB to perform some onload
> action.


If all you want is to access a function, why not put it into a JS file
and call it directly? Unless the page you are trying to access isn't
yours....

> Could I able to load the pageB without showing it ?


Yes, the trivial case:

<body style="display: none;">

But then you end up with an empty window and are still defeated by
pop-up blockers.

> pageA I would load the pageB onload event using javascript?
> I have one method i.e. <body onload="window.open("www.try.com",
> height=0, ... )>


Again, put the function into a JS file, then the same code is avaialble
to both pages. I'm struggling with the concept of loading an HTML page
for the sole purpose of running a JavaScript function.

Perhaps I am missing the point of what you are trying to do...


Cheers, Fred.
 
Reply With Quote
 
kuok benny
Guest
Posts: n/a
 
      10-13-2004
Fred Oz wrote:
> Again, put the function into a JS file, then the same
> code is available to both pages. I'm struggling with the > concept of

loading an HTML page for the sole purpose of
> running a JavaScript function.


Your suggestion is good. However, multiple functions or procedure I
wrote are on the pageB.
Basically, I need to wrote a javascript that could call
pageB' function or procedure(not using javascript) rather than wrote
another set of functions in javascript on pageA.
My idea is to load the pageB's functions or procedures on pageA by using
sth like onload event on pageA.






*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      10-13-2004
kuok benny wrote:
> Fred Oz wrote:
>
>> Again, put the function into a JS file, then the same
>>code is available to both pages. I'm struggling with the > concept of

>
> loading an HTML page for the sole purpose of
>
>>running a JavaScript function.

>
>
> Your suggestion is good. However, multiple functions or procedure I
> wrote are on the pageB.
> Basically, I need to wrote a javascript that could call
> pageB' function or procedure(not using javascript) rather than wrote
> another set of functions in javascript on pageA.
> My idea is to load the pageB's functions or procedures on pageA by using
> sth like onload event on pageA.


To repeat what Fred said, and I don't think you understood.

Take the script that is in pageB, put it into an external .js file, then
include it in both pages:

<script type="text/javascript" src="myJSCode.js"></script>

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
kuok benny
Guest
Posts: n/a
 
      10-13-2004

Randy wrote:-
> Take the script that is in pageB, put it into an
> external .js file, then
> include it in both pages:

<script type="text/javascript" src="myJSCode.js"></script>

Hi,

let say I put the
<script type="text/javascript" src="myJSCode.js"></script> on page
e.g.http://www.channel.com/main.php. My question is inside myJSCode.js,
anyway to wrote the function for me to redirect to another url e.g.
http://www.visitme.com/visit.aspx?visit=1 such that this process would
pass parameter value to page http://www.visitme.com/visit.aspx without
loading the page http://www.visitme.com/visit.aspx itself ?

Thanks in advance.

regards,

benny


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      10-13-2004
kuok benny wrote:

> Randy wrote:-
>
>>Take the script that is in pageB, put it into an
>>external .js file, then
>> include it in both pages:

>
> <script type="text/javascript" src="myJSCode.js"></script>
>
> Hi,
>
> let say I put the
> <script type="text/javascript" src="myJSCode.js"></script> on page
> e.g.http://www.channel.com/main.php. My question is inside myJSCode.js,
> anyway to wrote the function for me to redirect to another url e.g.
> http://www.visitme.com/visit.aspx?visit=1 such that this process would
> pass parameter value to page http://www.visitme.com/visit.aspx without
> loading the page http://www.visitme.com/visit.aspx itself ?


No. Because to initiate visit.aspx, you *must* request it from the
server. That means you "load" it. Whether in a hidden frame, or via an
HTTPRequest Object, hidden IFrame, or however, you must load it.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
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
Anyway to Run Code Not Associated with Loading a Page? Jonathan Wood ASP .Net 10 01-03-2009 11:24 PM
anyway to do this without post back to server Paul ASP .Net 2 04-11-2008 10:38 PM
Network adapter there, but not showing anyway to connect with it lostends Wireless Networking 0 08-14-2006 06:16 PM
RM Recorder - anyway to get Realplayer 10 drivers without install? audioguy@stream.net Computer Support 5 12-14-2005 04:45 PM
refreshing control data on a page, without the entire page re-loading Milsnips ASP .Net 1 05-16-2005 10:35 AM



Advertisments