Hi everyone,
Has someone out there experienced the same problem? What i wanted to do is
to display a popup window (modal) upon the loading of a webpage. Here is my
code sample (in html view):
<HTML>
<HEAD>
....
</HEAD>
<BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout">
....
....
</BODY>
</HTML>
Where ShowPopUp() is a JavaScript function to display the popup window.
However it does not get called. When I replaced the function with just a
simple alert('Hello') function, still nothing is displayed at load up.
However, crazy enough, I got it to work on some of the pages though.?????
Is there anything that is missing or shouldn't be there?
Please help me...
Calvin 7 6169
Try using :-RegisterStartupScript Method
Check sample at:- http://www.codeproject.com/aspnet/Mayank_Gupta.asp
or http://www.aspnetpro.com/NewsletterA...200410bm_l.asp http://msdn.microsoft.com/library/de...criptTopic.asp
Hope that helps
Patrick
"Calvin KD" <Ca******@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com... Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is
my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin
It looks ok. Do you have javascript enabled on that machine?
Eliyahu
"Calvin KD" <Ca******@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com... Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is
my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin
Where have you defined the JavaScript function? When you use the body
"onload" event to call a function, it must be declared in the head. The
RegisterStartupScript() method puts the JavaScript code that should run when
the page is loaded at the bottom of the form. This always works, as long as
there are no references in the script to HTML elements below the script in
the page. This is due to the fact that browsers don't always get all of the
HTML for the page in one swell foop.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Paranoia is just a state of mind.
"Calvin KD" <Ca******@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com... Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin
Thank you so much for all your responses.
My ShowPopUp() javascript function is declared in the header on the same
page as where it's called. What really puzzled me was even the
onload="alert('Hello');" did not display the message at load up.
What I really want to do is showing the popup (modal) window, which is a
Search screen where the user selects a record. When the popup is closed, the
selected ID is returned back to the parent window, put the returned ID in a
hidden field then reload the page so that the rest of the details can be
displayed on the screen.
How easy is it to do this using the RegisterStartupScript facility?
Thanks again,
Calvin
"Calvin KD" wrote: Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin
Calvin.
I posted some sample links in my earlier post how you could use it.
If u still can't figure it out post your Js and will feed you back.
Patrick
"Calvin KD" <Ca******@discussions.microsoft.com> wrote in message
news:AE**********************************@microsof t.com... Thank you so much for all your responses. My ShowPopUp() javascript function is declared in the header on the same page as where it's called. What really puzzled me was even the onload="alert('Hello');" did not display the message at load up. What I really want to do is showing the popup (modal) window, which is a Search screen where the user selects a record. When the popup is closed,
the selected ID is returned back to the parent window, put the returned ID in
a hidden field then reload the page so that the rest of the details can be displayed on the screen. How easy is it to do this using the RegisterStartupScript facility?
Thanks again, Calvin
"Calvin KD" wrote:
Hi everyone, Has someone out there experienced the same problem? What i wanted to do
is to display a popup window (modal) upon the loading of a webpage. Here is
my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages
though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin
Thanks so much Patrick. I think I have some ideas as how to do it and I will
give it a shot.
Would you be kind enough to check out this post again next week in case I
still have issues and may ask for your help?
Thanks again,
Calvin.
"Patrick.O.Ige" wrote: Calvin. I posted some sample links in my earlier post how you could use it. If u still can't figure it out post your Js and will feed you back. Patrick
"Calvin KD" <Ca******@discussions.microsoft.com> wrote in message news:AE**********************************@microsof t.com... Thank you so much for all your responses. My ShowPopUp() javascript function is declared in the header on the same page as where it's called. What really puzzled me was even the onload="alert('Hello');" did not display the message at load up. What I really want to do is showing the popup (modal) window, which is a Search screen where the user selects a record. When the popup is closed, the selected ID is returned back to the parent window, put the returned ID in a hidden field then reload the page so that the rest of the details can be displayed on the screen. How easy is it to do this using the RegisterStartupScript facility?
Thanks again, Calvin
"Calvin KD" wrote:
Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin
Thanks so much Patrick. I have managed to get it to work base on your ideas.
So thanks again.
Cheers.
Calvin
"Patrick.O.Ige" wrote: Calvin. I posted some sample links in my earlier post how you could use it. If u still can't figure it out post your Js and will feed you back. Patrick
"Calvin KD" <Ca******@discussions.microsoft.com> wrote in message news:AE**********************************@microsof t.com... Thank you so much for all your responses. My ShowPopUp() javascript function is declared in the header on the same page as where it's called. What really puzzled me was even the onload="alert('Hello');" did not display the message at load up. What I really want to do is showing the popup (modal) window, which is a Search screen where the user selects a record. When the popup is closed, the selected ID is returned back to the parent window, put the returned ID in a hidden field then reload the page so that the rest of the details can be displayed on the screen. How easy is it to do this using the RegisterStartupScript facility?
Thanks again, Calvin
"Calvin KD" wrote:
Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is my code sample (in html view): <HTML> <HEAD> ... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ... ... </BODY> </HTML> Where ShowPopUp() is a JavaScript function to display the popup window. However it does not get called. When I replaced the function with just a simple alert('Hello') function, still nothing is displayed at load up. However, crazy enough, I got it to work on some of the pages though.????? Is there anything that is missing or shouldn't be there? Please help me... Calvin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: tilt |
last post by:
Hello,
I use an object element to replace the iframe element in ie, like this:
<object
id="x_obj"
data="http://.../"
type="text/html">
<iframe name="x_if" id="x_if"...
|
by: Jason |
last post by:
Hello,
I am trying to dynamically create a table, then set its <td>'s onclick:
var table = document.createElement("table");
var row = table.insertRow(-1);
var td = row.insertCell(-1);...
|
by: matheussousuke |
last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails.
The goal is: Make it send the email with the URL...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |