Board index » cppbuilder » Avoid messages form script error in TCppWebBrowser

Avoid messages form script error in TCppWebBrowser


2007-02-01 04:03:46 AM
cppbuilder22
Hi!
I load a html page in my Browse component (TCppWebBrowse)
But this page is really a frame on a parent page.
The problem is that this page has some java scripts that refer to the
parent page...
So, when it try to run, causes an error...
There some way to "avoid" this messages? Because don't have this scripts
running is not a problem...
And loading directly the frame, I avoid the problem that is "find it,
because i take a look in others posts and this is a bit complicated to
me in this time...
Thanks :)
 
 

Re:Avoid messages form script error in TCppWebBrowser

Eduardo Jauch escreveu:
Quote
Hi!

I load a html page in my Browse component (TCppWebBrowse)
But this page is really a frame on a parent page.

The problem is that this page has some java scripts that refer to the
parent page...
So, when it try to run, causes an error...

There some way to "avoid" this messages? Because don't have this scripts
running is not a problem...

And loading directly the frame, I avoid the problem that is "find it,
because i take a look in others posts and this is a bit complicated to
me in this time...

Thanks :)
Othe "reason" for I to want to do this is that I wnat to load this frame
by code, and if I load the whole page, the way to get to then is by a
flash menu, and I don't know how to select the item in the flash by code...
 

Re:Avoid messages form script error in TCppWebBrowser

Eduardo Jauch wrote:
Quote
I load a html page in my Browse component (TCppWebBrowse)
But this page is really a frame on a parent page.
It is unclear to me what you are speaking about. Please
dig into the htmlcode to show us what you ment.
Say there is a htmlpage that contains frames. The sourcecode
of such a htmlpage is usually very minimal as it only contains
something like:
<frameset>
<frame src="top.html">
<frame src="left.html">
<frame src="main.html">
</frameset>
Now tell us what did you load ? main.html? You did not
load a frame then but the contents for a frame.
Hans.
 

{smallsort}

Re:Avoid messages form script error in TCppWebBrowser

Hans Galema escreveu:
Quote
It is unclear to me what you are speaking about. Please
dig into the htmlcode to show us what you ment.

Say there is a htmlpage that contains frames. The sourcecode
of such a htmlpage is usually very minimal as it only contains
something like:

<frameset>
<frame src="top.html">
<frame src="left.html">
<frame src="main.html">
</frameset>

Now tell us what did you load ? main.html? You did not
load a frame then but the contents for a frame.

Hans.

So, sorry :)
I look at the html code and don't find <frameset>
I only find this:
<td width="587" valign="top" class="td_bege">
<iframe src="/agendamento-web/index-content.jsp" id="iContent"
name="iContent" scrolling="no" frameborder="0" width="588"
height="0"></iframe>
</td>
But the main page have too a flash menu...
One of the options of this menu, change what I see on the frame.
Really, if I use the right button of the mouse to load the frame in
another tab (I'm using firefox), the page that is load is this:
index-content.jsp (it's what appear at adress bar)
When i click a certain button on the flash, the contents of the frame
change, and if I do the same, the result at adress bar is:
login?redirect=/agenciadores.do
If I use this adress diectly, in Firefox, i don't have any errors...
But in my program, if I load this direct, It's loaded, but always show a
popup asking for continue running scripts.
The error is caused for this line:
<body onLoad="parent.PreparePage(document.body.scrollHeight,'');
addLocale();">
Because The parent page (main page) was not loaded.
There a way to stop this message from been show?
The url is:
www.visto-eua.com.br/agendamento-web/index.jsp
The option that I click in the flash menu is:
"Agência de viagens"
The 4 from botton :)
Thanks :)
 

Re:Avoid messages form script error in TCppWebBrowser

Eduardo Jauch wrote:
Quote
I load a html page in my Browse component (TCppWebBrowse)
But this page is really a frame on a parent page.

The problem is that this page has some java scripts that refer to the
parent page...
So, when it try to run, causes an error...

There some way to "avoid" this messages? Because don't have this
scripts running is not a problem...
Set CPPWebBrowser's property "Silent" to true, and then script errors no
longer "pop up". Thanks to Enrique (in the thread above entitled
"CppWebBrowser popup") for this tip.
--
-
Mark Jacobs
DK Computing
www.dkcomputing.co.uk