Bootstrap Modal Ajax not working on click without the alert on second line.
please help
http://pastebin.com/cyXdWSPq
Try wrapping your code in a $(document).ready(function(){}) or equivalent. When I see stuff like this it's usually because the document is not fully loaded yet. Give it a shot.
Related
I want to open a text area when i press the comment button without page getting reloaded.Please help.I am a newbie in this field.
I have tried seeing some tutorials but not of much help.I have never used Jquery before
Use this jQuery code:
hide the textArea element by default.
$("#[buttonID]").click(function(){
$("#[textAreaID]").show();
}
I have a problem with a component that loads in to a modal window. I am using the Alpha User Points system and it has a component that gives you a full list of yous site's users. It also gives you the ability to order by username, by points etc. If I use it outside of modal window it works fine. If I use it in to modal window, ordering don't work!!! When I put my mouse over table's headers, outside of modal window gives this...javascript:tableOrdering('aup.referreid','asc','');In to modal window I see this...javascript:tableOrdering('aup.referreid','asc','');?ml=1 Using Firebug, I remove this ?ml=1 and it works into modal also!!! So the question is, why in to modal window gives this ?ml=1, what is this? And how will I remove it?
Well here is the answer... I use the Modalizer extension of nonumber.nl. I was loading my component through modalizer's modal box, this is why I had this issue. So, if anyone use Modalizer to popup components and have the same problem with me, just go to modalizer's Plugin Manager, find the option Convert Links inside Window and disable it!!! But, after this, if you want to add link in to modal window and you don't want to show-up the whole front page but only the component or what ever this is, you have to add at the end of the link this &ml=1.
First of all, I had all my buttons which opened the Colorbox using the "ajax" class. That class however caused me many problems:
1-When I open one window, it will appear, when I close it and re-click the same button, it will be loaded twice (so I need to click twice to close)
Is there a fix for this?
What I have done for the moment:
Use iframes; my only problem now is I cant load the other colorboxes that are linked in that iframe. I am using the inline class.
Let me re-phrase that: I click on button "generate" it opens first colorbox with the iframe class. Inside that iframe I have a "generate_2" button which has inline content. Once I click that second button nothing happens. This used to work when I had the first button set to ajax.
What can I do?
thanks!
I had the same problem before. Since JavaScript cannot affect iframes, you must add the JavaScript code inside a script tag in the iframe page itself.
when I close it and re-click the same button, it will be loaded twice (so I need to click twice to close) Is there a fix for this?
I'd wager you are using ajax to open a complete HTML document, aren't you? You shouldn't be doing that. It's not valid HTML to nest one HTML document inside another, and you are causing the scripts from both to be applied to the original document. Each time you load that content, those scripts are being loaded and executed all over again.
I have a problem...
I'm working on a dialog in which there're two buttons that are linked with two different actions.
I'd like to have two Ajax requests when the buttons are clicked.
I tried every kind of javascript scripts but it dosn't work...
I premise that in the page of the dialog I haven't included jquery mobile scripts (in the guide is said that dialogs don't need links to the script if they're called as dialogs through a link [data-rel])
It seems that inside dialog external javascript code isn't loaded...
This is a problem...
Do you think it's better to call the dialog with a simple link (without data-rel and with data-ajax=false) and replace data-role=page with data-role=dialog (I mean inside the dialog page).
Thank you
Best regards
Luca
I found the solution through Jquery mobile forum...
The problem is that for dialogs the javascript code must be wrote inside the page div and not at the end of the body (the classical position of javascript code).
So your code will be loaded and will work...
I have a webapp that store a layout,
And on its edit mode the user should click on the layout option inside a jquery ui dialog.
After the user choose the template that he/she want, the page will automatically reload.
I want the jquery-ui keep open even after the page was reloaded...
Hope it makes sense.
Hoping for your replys.
King Pangilinan
I guess your whole page is being reloaded? If so you can't keep the dialog open but re-open it when your dom has been loaded. To do so you can do:
$(document).ready(function() {
$("dialog_selector").dialog('open');
});
That just opens it. Now if you want to do it on a page reload you would have to embed this javascript code in some conditional ERB-code (if you're using ERB) or similar which meets your conditions...
Hope it's clear what I mean.