jQuery error - Uncaught Error: can't load XRegExp twice in the same frame - ajax

I have a button, onclick of which I'm doing an AJAX call to one of my pages (which contains jqplot elements).
Now, the AJAX req/res works fine for the first click of the button.
When I click my button for the second time, I get an exception saying,
Uncaught Error: can't load XRegExp twice in the same frame
And it points to the jQuery-min file. Any idea on how I can solve this issue?
I have tried this solution and it does not work.

I think the handler is getting "attached" before the DOM element in question actually exists.
Try using jquery.on().

Related

Need help on clicking an element (Element is not clickable at point (62, 459)) - Capybara Ruby Selenium Automation

I am having below error message in my console while trying to click on a button element:
unknown error: Element is not clickable at point (62, 459).
Other element would receive the click: <i class="foo foo-chase-lemon font-size-13"></i>
Here's my code below:
#object = Page.new
#object.wait_until_btn_element_visible
#object.btn_element.click
I have tried with retry 5 times to click on it using rescue but didn't help.
Below code also didn't work where i tried to move to that element before click.
Capybara.page.driver.move_to.(#object.btn_element).perform
Any solution will be greatly appreciated.
I tried increasing the resolution/ scrolling the window. None of them worked on this specific scenario. These solution might work for others.
However, I resolved the issue by clicking the button using javascript "execute_script" method in my automation script.

Kendo UI: navigate breaks when called from show for second time

In the show method of one of my views I run:
mobileApp.navigate('views/Login.html');
mobileApp is a kendo.mobile.Application-object.
This works fine the first time show runs. But the second time I get this exception:
"Cannot read property 'stop' of undefined"
The same happens if I put the navigate-code in beforeShow. But if I put it in another method triggered by a click on a button it works every time.
Please check the documentation and the code snippet for in the beforeShow event.

Wicket replacing panel with ajax fails with MarkupNotFoundException

the page markup has
<div wicket:id="stepPanel" />
tag in it and when the page is first loaded it works great that is
add(new MyFirstPanel("stepPanel"));
works fine. But then when I trigger an Ajax event and request redrawing
addOrReplace(new MySecondPanel("stepPanel"));
target.add(MyPage.this);
i get the following error
Last cause: Failed to find markup file associated. MyFirstPanel: [MyFirstPanel [Component id = stepPanel]]
please note that it tries to find the wrong markup (should look for markup for MySecondPanel) and it fails regardless it succedded to do so before!
I instantiate panels using reflection, but could it be a problem here? No exceptions thrown.
Anwser:
Actually it was something else - I have noticed that one of my AjaxSubmitLinks had reference to a form that was no longer placed in a markup... so whatever you do just remember not to leave that reference.
You are adding MyPage after replacing the Panel causing MyPage to re-render.
There is a good example on how to replace panels here.
Yes you can call panels via reflection. I don't clearly know what you are trying to do with event here but if you want you can attach your panel with AjaxSelfUpdatingTimerBehavior and define the duration which will update this component in the given time period.
Hope its useful.

Stackoverflow wmd load on click event

I'm having a problem using the wmd re-engineer script.
The problem is the div where the wmd-container sits has display:none. This causes the following errors to be outputed constantly:
Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]
[Break On This Error] if (inputArea.selectionStart || inputArea.selectionStart === 0) {
If I add display:none on the textarea the problem goes away. But when I apply display:block on the elements; wmd buttons do not appear.
I am trying to figure out a way on how I can create an instance of this when the button is clicked.
Has anyone done this? I've had no luck =(

Drupal ahah returns (An HTTP error 404 occurred) but path is working on browser and with jquery ajax

i have created a form to arrange some names in orders by drag n drop. IN this form user can add dynamic form element by add more button as we do in cck.
my code is working find on localhost and i can add form element dynamic and it is getting submited fine. but on live server when i press add more button it return "An HTTP error 404 occurred". i executed this path on browser address bar directly then it works and give me json result. when i tried to execute it with jquery ajax it returns (200 OK 1.4s). i am very confuse what is happening with ahah.
if anyone can help me.
Thanks in advance.
mmmm not understanding your situation perfectly but try to use
print drupal_to_js($result) ;
exit() ;
when you printing your json data

Resources