Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Open a webpage using Javascript in Excel

Hi All,

Got a question I'm hoping someone can answer. I've created a form,
which interacts with a webpage that uses Javascript. My current code
for the button pulls up a webpage and displays the information, but
when I select something on the webpage nothing happens. Top right of
pages says it's loading but nothing happens. I noticed that multiple
URLs are displayed at the bottom of the "real" webpage when buttons are
pressed. I was able to copy each URL that is displayed...not sure if I
need them or not. Any ideas on how I can make this work....if possible
?

Thanks in advance.

Here's my code:

Sub test()

Dim sPath As String
Dim aStr As String
Dim bTaskID As Double

With Application
Application.Visible = False

sPath = "C:\Program Files\Internet Explorer\IEXPLORE.exe" 'my browser

aStr = ("http://mq-mapgend.websys.aol.com")
bTaskID = Shell(sPath & " " & aStr, vbNormalFocus)

End With
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Open a webpage using Javascript in Excel

I meant to point out that the webpage listed in the code is an example.
The real URL is password protected...Sorry

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Open a webpage using Javascript in Excel

Shell should give you the same result as loading the page "manually": if
it's not loading correctly then maybe there's an issue with the web page.

You do have javascript enabled in your browser?

Tim

--
Tim Williams
Palo Alto, CA


wrote in message
oups.com...
I meant to point out that the webpage listed in the code is an example.
The real URL is password protected...Sorry



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Open a webpage using Javascript in Excel

Hi Tim,

Thanks for the reply.

I do have javascript enabled. In short, The excel form I've created
has shortcuts, (buttons), where I can pull data from a password
protected site quickly. This particular URL that is not working brings
up a webpage where I can enter a city name. Once the city name is
entered, there is a "go" button that I would click. That would bring
up the main webpage and zoom to that city on a map where I can proceed
to click on objects for information.

I did some clicking here and there and came across an error message :
Line: 91 Char: 18 Error: 'top.window.opener' is null or not an
object. Any ideas ??

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Open a webpage using Javascript in Excel

That's an error in the webpage you're using. It's trying to reference
another page hosted in a different window ("opener") and this is not found.

This type of script typically shows up in a pop-up window when it needs to
reference the page which opened the pop-up, so maybe you are openeing the
opo-up directly from excel?

Tim

--
Tim Williams
Palo Alto, CA


wrote in message
oups.com...
Hi Tim,

Thanks for the reply.

I do have javascript enabled. In short, The excel form I've created
has shortcuts, (buttons), where I can pull data from a password
protected site quickly. This particular URL that is not working brings
up a webpage where I can enter a city name. Once the city name is
entered, there is a "go" button that I would click. That would bring
up the main webpage and zoom to that city on a map where I can proceed
to click on objects for information.

I did some clicking here and there and came across an error message :
Line: 91 Char: 18 Error: 'top.window.opener' is null or not an
object. Any ideas ??

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Open a webpage using Javascript in Excel

Tim,

Thanks for the help. I was opening the popup directly from Excel. I
guess I will need to find a way to open the main page 1st, wait till
the page has fully loaded and then open the zoomgoto URL...somehow. At
least this gives me some understanding of what's going on.

Thanks again.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading javascript web pages using workbooks.open lesy99 Excel Discussion (Misc queries) 0 March 30th 07 09:06 PM
Cannot Open Webpage With Excel 2003 rdshadden Excel Discussion (Misc queries) 0 May 25th 06 05:59 AM
Open webpage Tom Ogilvy Excel Programming 0 July 22nd 04 05:28 PM
Open webpage Gee...[_2_] Excel Programming 1 June 29th 04 07:50 PM
Open Webpage and then Run Code Nick Excel Programming 0 November 18th 03 11:31 PM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"