473,598 Members | 3,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Attri butes.Add("oncl ick","GetPositi on('"+this.Sear chBtn.ClientID+ "');return
false");

if i do the following....

SearchBtn.Attri butes.Add("oncl ick","GetPositi on('"+this.Sear chBtn.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.EventArg s e)
{
search.DoSearch ();
Response.Redire ct("searchResul t.aspx);
}
how could i solve this problem... any alternate way..

its urgent..please help...

Thanks in Advance..

Sanjay.C

Jun 10 '06 #1
4 3242
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.Attri butes.Add("oncl ick","GetPositi on('"+this.Sear chBtn.ClientID+ "');return
false");


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

--
Randy
comp.lang.javas cript 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.Attri butes.Add("oncl ick","GetPositi on('"+this.Sear chBtn.ClientID+ "');return
false");


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

--
Randy
comp.lang.javas cript 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="Def ault.aspx.cs"
AutoEventWireup ="false" Inherits="Dtf.W ebSite.Default"
smartNavigation ="False"%>
<%@ Register TagPrefix="uc1" TagName="Tracki ng" Src="Tracking.a scx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title runat="server" id="title"></title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="C#" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<LINK id="style" type="text/css" rel="stylesheet " runat="server">
</LINK>
<script language="javas cript"
src="ClientScri pts/ProcessBar.js"> </script>
<script language="javas cript"
src="ClientScri pts/TextBoxScript.j s"></script>
<script language="javas cript">

function showHideFormEle ments(value)
{
var formElements = document.forms( 0).elements;
for(i=0 ; i < formElements.le ngth ; i++)
{
if(formElements (i).tagName == "SELECT")
{
formElements(i) .style.visibili ty = value;
}
}
}
function getElementPos(s ElementID)
{
if(!document.ge tElementById) return null;
var e = document.getEle mentById(sEleme ntID);
if(e == null ) return null;
var p = { x: 0, y: 0};
while(e)
{
p.x += parseInt(e.offs etLeft,10);
p.y += parseInt(e.offs etTop,10);
e = e.offsetParent;
}
return p;
}
function GetPosition(cli entID)
{

showHideFormEle ments("hidden") ;
Popup.style.dis play = "block";
Popup.style.pos ition = "absolute";
Popup.style.lef t = 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="PopupTab le" 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.c om, 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.javas cript 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
1453
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 href='myurl'><img src='mygif.gif'></a> Regards Hoe
13
7429
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" runat="server"></asp:imagebutton></A> When the user sees these buttons, they will currently be on the savings.aspx?category=whatever page, and when they click another button to look at other categories, all the links I have around these buttons direct to their various categories.
3
13945
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 Developer 2005 (Express Edition) built-in web server, but fails when run under IIS (same file, same location). I think I've tracked the problem to a failure of IIS to find WebResources.axd. For example, if I point IE to the src centerated by the...
2
2647
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 therefore created a little animated gif, which, when the button is clicked, I display using javascript in a floating div, the idea being that the animation shows that something is happening until the postback occurs.
3
6212
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 should do to resolve this problem, do you have any suggestions? Regards.
4
6338
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 unpredictable. If I connect it to the onload event, sometimes only half the page will be displayed. Does the onload even fire before rendering? Does anyone know a reasonable way to accomplish my original goal of
2
1791
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 proportional if the user chooses to size up or size down. This pretty much takes care of the browser size complications. Here is original script and it works. But now I have few problems after this. CODE#1 <!-- masked --> <html> <head>...
1
2339
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, Default.aspx and Default2.aspx. Note that the example is a deliberately simplified example - just used to reproduce the problem, and not meant to be very useful. Default.aspx - add button1. In codebehind, hookup click event :
0
7899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8397
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8264
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5850
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5438
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3897
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3939
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2412
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1504
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.