Re: [jQuery] IE and Javascript in Ajax Content

2007-03-30 Thread Marshall Salinger
Dan Shields wrote:
> Is there an issue in IE that won't let you put Javascript in content 
> that is pulled in via Ajax. I have a page that has a navigation menu 
> and when you click on any of the links it pulls an HTML page in with 
> Ajax. I am using the *Ajax History 
>  *plugin and in some 
> of the html files I am using some javascript. It works fine in Firefox 
> but in IE its like its not picking up the Javascript.
> 
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>   
I had a similar issue recently. What does the javascript that you load 
with the html via ajax do? It sounds like you may need to create a 
function out of the loaded javascript and then call the function in the 
ajax callback.

-Marshall

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] document ready not firing when loaded via ajax in IE

2007-03-19 Thread Marshall Salinger
Chris Domigan wrote:
> Marshall,
>
> I'm pretty sure you don't need to call document.ready() when using 
> ajax. This function is there for dealing with a standard "page load" 
> rather than dynamic content. If you are using .load() for instance, 
> scripts are automatically evaluated after the html has been inserted.
>
> Chris
> 
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>   
Thanks Chris,

Your response helped me. That is what I figured, but for some reason, I 
thought it might work because FireFox was working with it and IE wasn't. 
I was trying to bind click events to elements loaded via ajax with a 
script that is also loaded with the same content. So basically, I had to 
remove the document ready, big duh, wrap everything in a function and 
then call that function in the .get callback.

-Marshall


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] document ready not firing when loaded via ajax in IE

2007-03-18 Thread Marshall Salinger
[EMAIL PROTECTED] wrote:
> checkout $.getScript() on visualjquery.com under the ajax tab
>
> Thank You, David
> SENT FROM MY TREO 650 HANDHELD
>
> -Original Message-
>
> From:  Marshall Salinger <[EMAIL PROTECTED]>
> Subj:  [jQuery] document ready not firing when loaded via ajax in IE
> Date:  Sun Mar 18, 2007 11:24 am
> Size:  547 bytes
> To:  "jQuery Discussion." 
>
> Hey jQuerians,
>
> I am having trouble getting IE to recognize a script that is loaded with 
> html via ajax. I tried both .get and .ajax and neither will work. I 
> can't get a simple alert to fire when the content is loaded. Everything 
> works as expected in FireFox. I have done a few searches in the archives 
> and tried implementing those solutions, but they didn't work. Can anyone 
> point me in the right direction?
>
> Thanks,
> Marshall
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>   
Hi David,

Thanks for the reply and I have tried using .getScript without any luck. 
The thing that gets me, is that I can't get any code to execute in IE in 
a document ready statement when loaded via ajax. I have posted a very 
simple test page.

http://salingermultimedia.com/jQuery/ajax/

Loading the html/js content triggers the alert in FireFox, but not in 
IE. Any help is greatly appreciated.

-Marshall

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] document ready not firing when loaded via ajax in IE

2007-03-18 Thread Marshall Salinger
Hey jQuerians,

I am having trouble getting IE to recognize a script that is loaded with 
html via ajax. I tried both .get and .ajax and neither will work. I 
can't get a simple alert to fire when the content is loaded. Everything 
works as expected in FireFox. I have done a few searches in the archives 
and tried implementing those solutions, but they didn't work. Can anyone 
point me in the right direction?

Thanks,
Marshall

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] carousel example with dynamic content via ajax

2007-03-06 Thread Marshall Salinger
Hi there again. I am willing to help you but only posting a small bit of
code from the plugin example is not going to help me see what you are
doing wrong. You say you have verified the image paths, yet they don't
show up? I would like to see *exactly* what you have in your txt file.
It is highly likely that what you have in your text file is what is
breaking that function. 

The function: getItemHTML(data) takes the data from the text file and
among other things, builds the link to load the larger image in the
thickbox. But it is geared around loading images from flickr.

Are you trying to replicate everything in the demo? If so, you need two
images. A thumbnail that has "_s" in the filename before ".jpg" and a
medium size image that has "_m" before ".jpg. The _m.jpg image will be
the one that gets loaded into the thickbox. 

If you post a link to your test page, I will be happy to look at the
source and point you in the right direction.

-Marshall


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of planner
Sent: Monday, March 05, 2007 11:17 PM
To: discuss@jquery.com
Subject: [jQuery] carousel example with dynamic content via ajax



Folks;

I am trying to implement the carousel example with dynsmic content
loading
via ajax. The images I'm specifying in my version of the *.txt file are
located in a directory in the root of my server. The problem is when the
page loads,  the images are not shown in the carousel: only the names
specified at the end of each line in the *.txt file are shown. 

I've verified that the path names for the images are good in the
carousel js
code. So I do not think that the problem is with path names. I do think
that
the issue may lie in this section of the js code:


 .

function getItemHTML(data)
{
var split = data.split(";");
var url   = jQuery.trim(split[0]);
var title = jQuery.trim(split[1]);
var url_m = url.replace(/_s.jpg/g, '_m.jpg');
return ' ' + url_m + '  ' + url + '  ';
};


--
 I have a pretty good idea what the code snippet is doing, but I do not
know
how to customize it for my specific case. 

thanks for any help
-- 
View this message in context:
http://www.nabble.com/carousel-example-with-dynamic-content-via-ajax-tf3
353866.html#a9327163
Sent from the jCarousel mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jcarousel issue

2007-03-05 Thread Marshall Salinger
I tried to pull up the image without the ";see|" at the end and I get a
404. That is probably why it is only showing the alt text. You probably
have your images in a subdirectory and you need to change the path to
reflect that. 

If you want to use the code as is, you need to name your thumbnail
images with an "_s.jpg" and medium images to "_m.jpg". These are the
naming conventions used by flickr. That is where the images are coming
from. 

The main hurdle you need to overcome is finding the right path to your
images.

http://www.liniverse.com/see.jpg

Is a 404, but

http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg

pulls up an image.

-Marshall

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Indigo
Sent: Monday, March 05, 2007 3:11 PM
To: jQuery Discussion.
Subject: Re: [jQuery] jcarousel issue


The code is exactly what you'll find by viewing the source at  
http://sorgalla.com/projects/jcarousel/example_dynamic_ajax.html . I
only 
changed the image and ajax.txt file paths.

If you, however, look at the content of example_dynamic_ajax.html,
you'll find 
lines like these (pay attention to the names of the files) :

http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg;Flower1|
http://static.flickr.com/75/199481072_b4a0d09597_s.jpg;Flower2|

My file names are simpler and look like these:

 http://www.liniverse.com/see.jpg;see|
 http://www.liniverse.com/me.jpg;me|

I've checked and double-checked the file paths and I find no problems
there, 
But looking at the js in the example, I find this section that seems to
be 
performing a replacement trick on the file names:


 .

function getItemHTML(data)
{
var split = data.split(";");
var url   = jQuery.trim(split[0]);
var title = jQuery.trim(split[1]);
var url_m = url.replace(/_s.jpg/g, '_m.jpg');
return '';
};


--

I'm not a coder, so I do not know how to customize the above code
snippet for 
my specific case.  i think the offending lines are these: 

 var url_m = url.replace(/_s.jpg/g, '_m.jpg');
return ' Can you post some sample code? It sounds like the paths to your images
> is wrong.
>
> -Marshall
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
> Behalf Of Indigo
> Sent: Monday, March 05, 2007 12:23 PM
> To: discuss@jquery.com
> Subject: [jQuery] jcarousel issue
>
>
> I am trying to implement a jcarousel element on a page that is not yet
> public.
> The example I'm using is the one with dynamic content loading via ajax
-
>
> http://sorgalla.com/projects/jcarousel/example_dynamic_ajax.html .
>
> My example_dynamic_ajax.txt file looks like this:
>
> http://www.liniverse.com/see.jpg;see|
> http://www.liniverse.com/me.jpg;me|
> http://www.liniverse.com/now.jpg;now|
>
> The issue is when the page loads, the "alt" text is displayed in the
> carousel
> rather than the images. Is this an issue familiar to anyone? The
> "lightbox"
> effect still works, but without the images.
>
> TIA
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jcarousel issue

2007-03-05 Thread Marshall Salinger
Can you post some sample code? It sounds like the paths to your images
is wrong.

-Marshall

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Indigo
Sent: Monday, March 05, 2007 12:23 PM
To: discuss@jquery.com
Subject: [jQuery] jcarousel issue

 
I am trying to implement a jcarousel element on a page that is not yet
public. 
The example I'm using is the one with dynamic content loading via ajax -

http://sorgalla.com/projects/jcarousel/example_dynamic_ajax.html .

My example_dynamic_ajax.txt file looks like this:

http://www.liniverse.com/see.jpg;see|
http://www.liniverse.com/me.jpg;me|
http://www.liniverse.com/now.jpg;now|
 
The issue is when the page loads, the "alt" text is displayed in the
carousel 
rather than the images. Is this an issue familiar to anyone? The
"lightbox" 
effect still works, but without the images.

TIA

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] FW: Why are my graphics "jumping"?

2007-03-03 Thread Marshall Salinger
Hey Rick,

I noticed the jump in IE 6. I assume that is the browser that you are
viewing the bug in. At first, I thought you were referring to the slight
jitter that occurs while both animations are occurring, which is
addressed by John's fix.

The bug is actually an IE css bug related to the default browser margins
on the ul tags. Rather than using a bottom margin to space the ul's, you
should use bottom padding instead. 

I have posted an example that doesn't jitter in IE 6 with the
appropriate css to cancel out the browser defaults. I am not seeing any
issues in IE 7 with either padding or margins and this code.

http://salingermultimedia.com/jQuery/accordian/IEsucks.html

I hope this helps.

-Marshall

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Saturday, March 03, 2007 1:14 PM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] FW: Why are my graphics "jumping"?

Hi, John...and thanks for the reply.

It happens whenever a graphic starts the slide upwards.
It jumps from its starting position to about where the
bottom link is, then the slide smooths out.

I noticed you're example doesn't do it.  Although in IE 7 when
the page is first loaded or refreshed and a graphic is clicked... most
visible when the first or second graphic is clicked... the slide takes
place, but the graphic doesn't move until the slide is finished.  After
the first click, the graphics slide normally.

I copied your markup to a page and tried it and I get the same results.

So your markup solves one problem, but creates another, at least in IE
7.

But I just can't figure out why Carlos' menu works so well at
http://www.generalmedicine.com/index2.htm and mine doesn't.  I think
I've
got all the pertinent files and markup necessary.

???

Rick

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of John Resig
Sent: Saturday, March 03, 2007 2:07 PM
To: jQuery Discussion.
Subject: Re: [jQuery] FW: Why are my graphics "jumping"?

Are you talking about when you click "For Physicians" then click
"Facilities" - and the "For Hospitals" image jumps a little bit?

If so, that's currently an issue with how jQuery does animation - they
are not synchronized in nature. For example. the one div is sliding up
and the other is sliding down, it's not guaranteed that when one is at
90px tall, the other will be exactly at 10px (if the combined height
was 100px).

Unfortunately, it requires significant overhead (in jQuery) to do
something that complex.

If you absolutely must not have the final image move, the alternative
is to position everything absolutely, then simply adjust the top of
the sections that you need to move (in addition to doing a
slideup/slidedown on the links).

I took the time to build a demo for you, since it is rather non-trivial:
http://john.jquery.com/ticket/stable-slide/

I restructured the markup to be ul/li elements (works better in this
case) and gave all child uls a set height (this is required if you
want the image positions to remain stable). In the case of this demo,
I set the height to 75 pixels - but you can adjust that.

--John





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] KICK-BUTT javascript based Zoom feature

2007-02-26 Thread Marshall Salinger
This was posted a while back. The bottom example has the same
functionality.
 
http://www.sevir.org/projects/storage/jpanview/index.html
 
-Marshall
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Faircloth
Sent: Saturday, February 24, 2007 9:43 AM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] KICK-BUTT javascript based Zoom feature
 
Well. anyone know how to accomplish this in jQuery?
 
http://tinyurl.com/yubt54_spam
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Stith
Sent: Monday, February 05, 2007 9:53 AM
To: jQuery Discussion.
Subject: Re: [jQuery] KICK-BUTT javascript based Zoom feature
 
Really all that is is a image of a grid that stays aligned with the
mouse, and a higher resolution image that scrolls depending on the mouse
position. It doesnt even use jQuery.

Im going to call this one as a lame attempt at spamming this mailing
list. 
On 2/5/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
http://tinyurl.com/yubt54_spam  
 

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]


www.dealerskins.com  
 

___
jQuery mailing list
discuss@jquery.com
  
http://jquery.com/discuss/


 


image001.png
Description: PNG image
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Using jQuery and Smarty

2007-02-14 Thread Marshall Salinger
All you should have to do is set a var in your include statement.

{include file="header.tpl" $jqueryWhatever=1}

And then in your header, use:

{if isset($jqueryWhatever)}



{/if}

Then you can call each individual script on a per template basis.

-Marshall


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Scott
Sent: Wednesday, February 14, 2007 8:55 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Using jQuery and Smarty

Mike Alsup wrote:
>> Sticking it in the template file would mean putting the
>> script block outside the head which I don't really want.
> 
> Why does it mean that?  I put all that stuff in the template like
this:
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
>