I have implemented a dynamic webpage whose content worked as per parameters set in URL inside an . in the content of the page we have a form which has jQuery based validation, collection of form data in an object and submission of data to there server using AJAX. looks pretty simple and decent.
The problem is that the jQuery script which is called in the page (which is inside iFrame) is not working properly. but if I load the jQuery by searching it in the webpage elements in chrome debugging tool and open it from there in separate tab by clicking on "open in new tab" from context menu, same jQuery based script related position start working when checked from console without reloading the page.
example: there is a variable in jQuery based script
formObj, when I am trying to access its content from console, console returns an error saying "
Uncaught ReferenceError: formObj is not defined
" but when I go to "
Element" tab in chrome dev tool, search for my script "
vendor.js", right click on it and press "open in new tab" from context menu. and then click back on "
console" and try to access same object without any reload of page, i.e. by typing
formObj
in console, I am getting the result. as shown in image below
Image 1
Image 2
What I have tried:
I have tried a lot of things including changing context as mentioned on lot of forums. I didn't found someone facing exact issue. Its weird but beyond logic.