Wednesday, July 1, 2009

[jQuery] Re: Problem with double submit of and form

i try it know with this code, but the problem with double submit of
the form still exists.
I read that I can have so many $(document).ready(function () { }); I
need.

<a href="#" id="testlink">Show Test</a>
<div id="tpanlegen" style="width: 100%; display: none;">
<form id="teilprojektcreate" action="/test.action" method="post">
<select name="test" id="test" class="textfeld" style="width:
100%;">
<option value="1950">Test 1</option>
<option value="2000">Test 2</option>
</select>
<input id="tpcsubmit" value="Submit" type="submit">
$(document).ready(function () {
$('#tpcsubmit').click(function(e) {
$('#teilprojektcreate').ajaxSubmit({
beforeSubmit: function() {
$('#indicator').show();
},
success: function() {
$('#indicator').hide();
$("#col2_content").effect("slide",{ },2000);
},
timeout: 3000,
target: '#col2_content'

});
return false;
});
});
</script>
</form>
</div>
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function () {
$('#testlink').bind(
'click',
function(e){
$("#tpanlegen").effect("slide",{ },2000
);
});
});
</script>

</script>
Best Regards
Johannes Geppert

-------------------------------------------------
web:http://www.jgeppert.com
twitter:http://twitter.com/jogep

[jQuery] Re: checkboxTree Plugin

Good to know that there is a plugin for this..!!


----- Original Message -----
From: "Matt W." <propellor@gmail.com>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Wednesday, July 01, 2009 8:30 AM
Subject: [jQuery] checkboxTree Plugin


>
> Hello Everybody,
>
> I have rewritten and posted my jquery checkboxTree plugin that I
> originally put out a year ago. Tried to add features and options
> people were asking for. Information can be found here:
>
> http://floatmargin.com/2009/jquery-checkbox-tree-plugin-new-and-improved/
>
> The github repository can be found here:
>
> http://github.com/magearwhig/jquery-checkboxtree
>
> -Matt W.

[jQuery] jQuery CrossSilde in IE7

Please forgive my inexperience, I am a designer trying to take over the development!

These 2 sites I created using cross-slide and it doesn't seem to work in IE7:

http://nirmada.bigrigmedia.com/portfolio/

and

http://horizonrvresorts.bigrigmedia.com/

Please help, THANK YOU!

[jQuery] Re: Looks like a bug in IE7 with replaceWith

there are a number of ways of doing this and make it look a lot cleaner

your problem could be that replaceWith replaces the whole element. Once you *replace* img#imp_plus001 that ID isn't there anymore so next time function runs it isn't found and no image change.
http://docs.jquery.com/Manipulation/replaceWith

If you don't have firebug it would be well worth installing it and looking at the html it produces after this replacement. None of the original element is left

Not sure why you going to trouble of rewriting the html each time. You already utlized attr("src") and easily could have switched that each time for cleaner look but even that looks ugly in your if conditions. One way to clean this up would be to toggle a class on each click, something like

$('a#mainmenu_anchor001').click( function() {

    ///change image source , nothing will happen to selector that isn't there
        $('img#imp_plus001 .minusORplus').attr("src", 'img/plus.gif');
        $('img#imp_plus001').not('minusORplus').attr("src", 'img/minus.gif');
       
        ///toggle class, removes if already there, adds if not
        $('img#imp_plus001').toggleClass('minusORplus');   
           
});   

To really shorten this up you could make images into sprite, give #imp_plus001 an absolute position then use the class"minusORplus" to shift the position of sprite in css. Adding and removing of   class"minusORplus" would then shift your image each time and all you would need for script is

$('a#mainmenu_anchor001').click( function() {
        $('img#imp_plus001').toggleClass('minusORplus');   
           
});   

css  .minusORplus {left: ///minus width of image}







Max Fedorov wrote:
Hi,  I have a following Jquery code, as you can see all it does when user clicks an html link it shows a hidden div (I am using SlideToggle).  The problem is in changing plus icon on minus icon after we clicked on a link, for example when div is hidden we should show plus, after we clicked a link and shown a hidden div we are showing minus icon. It perfectly works in Chrome and Firefox. But in IE7 I got a problem, it changes plus on a minus only once, and then shows minus only. I am not sure what modifications should I make to my code to get it working in IE.  Thanks in advance, really appreciate any help.  //Hiding first level of main menu $('a#mainmenu_anchor001').click( function(event) {  		var minusORplus = $("img#imp_plus001").attr("src");  if ( minusORplus == 'img/plus.gif' ) { 			$('img#imp_plus001').replaceWith('<img src="img/minus.gif" id="imp_plus001" alt="" border="0" align="top" \/>');  		}  		if ( minusORplus == 'img/minus.gif' ) { 			$('img#imp_plus001').replaceWith('<img src="img/plus.gif" id="imp_plus001" alt="" border="0" align="top" \/>');  		} 		//Removing filter attribute 		$('div#sub_menu_level001').slideToggle("fast", function() { 			if(jQuery.browser.msie) { 				this.style.removeAttribute('filter'); 		} 		});  		$('div#sub_menu_level001').css({'filter' : 'alpha(opacity=100)'}); 		event.preventDefault(); });    

[jQuery] Re: Need jQuery/Ajax/jsonp HELP


On Jul 1, 2009, at 6:15 AM, skywalk3r wrote:


Hi, I'm getting sick trying to solve this problem:

I have a web page A that loads another page B using an iframe (or an
object tag), the B page is an external page (it's not on my server)
and contains a form.

I want to be able to auto fill the form with pre-defined values. In
jquery i think it's impossible due to security reasons, somebody can
help me?!?!

I hope I explained the problem correctly, if you need more info just
tell me.
Thanks,

I'm pretty sure you're right, but it's a *JavaScript* security restriction, not specifically jQuery.


--Karl

____________
Karl Swedberg

[jQuery] ui.jquery.com down?

Is the UI section of the site down? I have a few websites that link to
it and they're all taking forever to load, seemingly hanging when
"waiting for ui.jquery.com..."

This is the first time I've seen this and am wondering if anyone else
is aware of the problem.

Thanks,

Vorge

[jQuery] [Validate] Radio buttons

Is it possible that, say i have two radio buttons, if radio one is
chosen validate gives a message(error) and if radio two is chosen the
form passes validation?