thanks I will. I thought that because is the same topic and the same problem… it could be using the same post.
One way would be to translate all the inline javascript code into jQuery code that can be put into an external javascript file or in the header/footer, using the methods I mentioned above or the enqueue script method.
cheers
Thanks LadyOpita, yes, I think we have the same problem so thanks for speaking up.
I’m off to read the Using_Javascript thing.
Birgire, I know jQuery’s great and all, but it feels like a big library for what I want to do. Anyway, my code isn’t jQuery code, it’s proper Javascript, it doesn’t feel right to re-write that to use a big library when it already works fine, WordPress is the problem* π
* How to make friends and influence people on a WordPress forum π
Whether you use jQuery or not, you should still place your javascript in an external file and enqueue it using wp_enqueue_script().
@jnascarb
another way: you could write a page template for your form (including your inline javascript)
http://codex.ww.wp.xz.cn/Pages#Creating_Your_Own_Page_Templates
but an external javascript file is cleaner π
cheers
Ta, the “Creating a Multiple Script File” part of http://codex.ww.wp.xz.cn/Using_Javascript is where I’m at, I’ll let you know if it works and if not, I’ll come back to those, tvm π
Hi all, total JS noob and same problem. And in other online forums the etiquette is to try and NOT start new threads for the same issue. Is WP Support different?
I’ve got JavaScript code that I want to work on a single post. Tried manually entering in Text field, nothing. Tried Javascript and CSS plugin, didn’t work. Could someone explain the “external file” method?
If helpful, I’m trying to replicate the wine value comparison tool shown on this page, widget down the right side: http://www.wellesleywinepress.com/2009/05/modeling-value-introducing-wwpqpr.html
Thanks in advance.
Is WP Support different?
Yes, per: http://codex.ww.wp.xz.cn/Forum_Welcome#Where_To_Post
It helps keep the forums better organized and avoids the difficulties in having multiple conversations at the same time with what are often not actually the same situations.
Here’s some general info –
http://codex.ww.wp.xz.cn/Using_Javascript
But please do start a new thread if you need more help.
Thanks WPyogi, I’ll follow the rules and do so. But just some feedback — when I have problems I’m constantly finding relevant threads, that unfortunately always seem to be closed. Other forums don’t shut down the conversation like WP Support.
Appreciate the link.