473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

GIFS not working properly in JavaScript PopUps

GIFS not working properly in JavaScript PopUps

Hi all,

I have a button and when i click tha button it redirects to another
page.....

I have also added a java script for the button that makes a popup..

the pop up is actually a DIV tag.. with a GIF image in it......

what actually should happen is ...

when i click the button ..the pop up should be visible with the
animated gif ..this should be visible till the processing is done and
the page is redirected....

popup here acts like a Processing bar...

The problem i have is ..

when i add this javascript... i could get the Gifs Animation...but the
button click is not called
SearchBtn.Attributes.Add("onclick","GetPosition('" +this.SearchBtn.ClientID+"');return
false");

if i do the following....

SearchBtn.Attributes.Add("onclick","GetPosition('" +this.SearchBtn.ClientID+"');return
true");
i could show the pop up till the processing is done and redirect but
the only problem is..... i could not have a proper animated gif image..

i have done the following in button click:
private void SearchBtn_Click(object sender, System.EventArgs e)
{
search.DoSearch();
Response.Redirect("searchResult.aspx);
}
how could i solve this problem... any alternate way..

its urgent..please help...

Thanks in Advance..

Sanjay.C

Jun 10 '06 #1
4 3228
Charleees said the following on 6/10/2006 2:37 AM:
GIFS not working properly in JavaScript PopUps

Hi all,

I have a button and when i click tha button it redirects to another
page.....

I have also added a java script for the button that makes a popup..
Show the HTML and Javascript that gets sent to the browser.
the pop up is actually a DIV tag.. with a GIF image in it......
Ok, how are you making the "popup" appear?
what actually should happen is ...

when i click the button ..the pop up should be visible with the
animated gif ..this should be visible till the processing is done and
the page is redirected....
Easy enough.
popup here acts like a Processing bar...

The problem i have is ..

when i add this javascript... i could get the Gifs Animation...but the
button click is not called
SearchBtn.Attributes.Add("onclick","GetPosition('" +this.SearchBtn.ClientID+"');return
false");


That looks more like server side VB than Javascript. Post the HTML that
gets sent to the browser.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 10 '06 #2

Randy Webb wrote:
Charleees said the following on 6/10/2006 2:37 AM:
GIFS not working properly in JavaScript PopUps

Hi all,

I have a button and when i click tha button it redirects to another
page.....

I have also added a java script for the button that makes a popup..


Show the HTML and Javascript that gets sent to the browser.
the pop up is actually a DIV tag.. with a GIF image in it......


Ok, how are you making the "popup" appear?
what actually should happen is ...

when i click the button ..the pop up should be visible with the
animated gif ..this should be visible till the processing is done and
the page is redirected....


Easy enough.
popup here acts like a Processing bar...

The problem i have is ..

when i add this javascript... i could get the Gifs Animation...but the
button click is not called
SearchBtn.Attributes.Add("onclick","GetPosition('" +this.SearchBtn.ClientID+"');return
false");


That looks more like server side VB than Javascript. Post the HTML that
gets sent to the browser.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Jun 10 '06 #3
thanks,

he is the Script....

<%@ Page language="c#" Codebehind="Default.aspx.cs"
AutoEventWireup="false" Inherits="Dtf.WebSite.Default"
smartNavigation="False"%>
<%@ Register TagPrefix="uc1" TagName="Tracking" Src="Tracking.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title runat="server" id="title"></title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK id="style" type="text/css" rel="stylesheet" runat="server">
</LINK>
<script language="javascript"
src="ClientScripts/ProcessBar.js"></script>
<script language="javascript"
src="ClientScripts/TextBoxScript.js"></script>
<script language="javascript">

function showHideFormElements(value)
{
var formElements = document.forms(0).elements;
for(i=0 ; i < formElements.length ; i++)
{
if(formElements(i).tagName == "SELECT")
{
formElements(i).style.visibility = value;
}
}
}
function getElementPos(sElementID)
{
if(!document.getElementById) return null;
var e = document.getElementById(sElementID);
if(e == null ) return null;
var p = { x: 0, y: 0};
while(e)
{
p.x += parseInt(e.offsetLeft,10);
p.y += parseInt(e.offsetTop,10);
e = e.offsetParent;
}
return p;
}
function GetPosition(clientID)
{

showHideFormElements("hidden");
Popup.style.display = "block";
Popup.style.position = "absolute";
Popup.style.left = 123;
Popup.style.top = 128;

}

</script>
</HEAD>
<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0">
<form id="main" method="post" runat="server">
</form>
<uc1:tracking id="Tracking1" runat="server"></uc1:tracking>
<div class="PopUp" id="Popup">
<TABLE class="PopupTable" id="PopupTable" height="500"
cellSpacing="0" cellPadding="0"
width="770" align="center" bgColor="white" border="0">
<tr>
<td vAlign="middle" align="center"><IMG
src="Images/FindingHotels_1_1.gif" border="0"></td>
</tr>
</TABLE>
</div>
</body>
</HTML>

Jun 10 '06 #4
Charleees said the following on 6/10/2006 5:46 AM:
thanks,
Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.

<URL: http://www.safalra.com/special/googlegroupsreply/ >
he is the Script....


Again, that is your server side code. Open the page in your browser,
right click>View source, and then post what the browser sees, not your
server side code. Or, post a URL to a sample page.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: tnhoe | last post by:
Hi, how do i code such that all gifs are loaded without missing any one of them ? I always get missing few gifs when the page loading with 30 gifs. I use IE6 to browse many <a...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
3
by: RobertS | last post by:
I'm trying to figure out what I need to do to configure IIS 5.1 on XP Pro to work when referencing WebResources.axd. For example, I have an aspx script that works fine when run from Visual Web...
2
by: Dale Reed | last post by:
Hi, I have a button on an aspx page (I'm using vs2005 with asp2), which when clicked takes a while to do some data processing before it posts back to the screen to display the results. I...
3
by: ZikO | last post by:
Hi. I am making a Multimedia Presentation in VB.NET 2005 and I have some animated GIFs which I need to use. I tried to use PictureBox for it but it doesn't play an animation in GIFs :/. What I...
4
by: Jeff | last post by:
Hi, I'd like to write Javascript that stops animated gifs from animating. On Firefox, at least, window.stop(); does the trick, although it stops everything on the page and is kind of...
2
by: spiralof5 | last post by:
Hi. I must first say I'm not an experienced scripter. Here's my problem and how far I am so far. I struggled for awhile to get the browser to fill most of it with my flash movie and keep it...
1
by: Moe Sisko | last post by:
Using : ASP.NET 2.0, IE 7. This is a strange problem with popups not working in IE to remote sites, even though popups are allowed in IE. To reproduce, create web site with two pages,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.