Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Ron1959
at 2024-08-03 21:20:52
Point:500 Replies:14 POST_ID:828694USER_ID:11588
Topic:
jQuery;;
The exact same code and exact same jquery files are on both localhost and the production server, and the path to the jquery files is correct, but...
...jquery does not work on localhost or in the design or live view in Dreamweaver.
Any ideas?
...jquery does not work on localhost or in the design or live view in Dreamweaver.
Any ideas?
Expert: Rob Jurd replied at 2024-08-04 15:08:17
Yeah it's a real pain. I ended up setting up a simple web server in house that had the same directory structure and using DNS to create alias records but that's overkill for you.
I'd just use relative paths or absolute URLs that include the domain
I'd just use relative paths or absolute URLs that include the domain
Expert: Scott Fell (padas) replied at 2024-08-04 12:01:45
When you are using dreamweaver, it has to do with setting up your site correctly(in dreamweaver). This messes a lot of people up.
Author: Ron1959 replied at 2024-08-04 11:24:56
src="../jQueryUI/js/jquery-ui.js" seems to be working for my files installed at
src="http://localhost/www.mywebsite.org/jQueryUI/js/jquery-ui.js"
Of course, "../" would have to change, depending on where in the file structure the file it's in is located. It could be "../../", or??
It would be a lot easier if src="/jQueryUI/js/jquery-ui.js" worked on both the localhost and production server.
src="http://localhost/www.mywebsite.org/jQueryUI/js/jquery-ui.js"
Of course, "../" would have to change, depending on where in the file structure the file it's in is located. It could be "../../", or??
It would be a lot easier if src="/jQueryUI/js/jquery-ui.js" worked on both the localhost and production server.
Author: Ron1959 replied at 2024-08-04 11:15:27
Ding! Ding! Ding!
That was it. I was using src="/jQueryUI/js/jquery-ui.js", which works on the production server, but not on the localhost.
This is what works on localhost:
src="http://localhost/www.mywebsite.org/jQueryUI/js/jquery-ui.js"
You have earned your points, but what's the best way to get the same code to work on both the testing server and production server?
Thanks!
That was it. I was using src="/jQueryUI/js/jquery-ui.js", which works on the production server, but not on the localhost.
This is what works on localhost:
src="http://localhost/www.mywebsite.org/jQueryUI/js/jquery-ui.js"
You have earned your points, but what's the best way to get the same code to work on both the testing server and production server?
Thanks!
Accepted Solution
Expert: Rob Jurd replied at 2024-08-04 06:38:54
500 points EXCELLENT
I only say that because as the links are absolute they should be located at http://localhost/jsfiles/jquery.js
If you put that link into your browser do you get the jQuery script?
If you put that link into your browser do you get the jQuery script?
Expert: Rob Jurd replied at 2024-08-04 06:35:13
You mentioned before that your urls are absolute, but is your site http://localhost/ or is it http://localhost/mysite ..
Expert: Rob Jurd replied at 2024-08-04 06:30:03
JQuery may work in live view but will not work in design view. The best way to test is via a browser.
I would now set up a simple web page on localhost and include jQuery. Can you get that to work? All you need to do is:
$(document).ready(function() {
alert("jQuery");
});
I would now set up a simple web page on localhost and include jQuery. Can you get that to work? All you need to do is:
$(document).ready(function() {
alert("jQuery");
});
Expert: duncanb7 replied at 2024-08-04 06:23:45
Just keeping to play around and using FF developer debugger that will
find out the bug finally, you can use firebug or other debugging tool on FF
or switch to use chrome browser
Be Reminded that is easy question
Duncan
find out the bug finally, you can use firebug or other debugging tool on FF
or switch to use chrome browser
Be Reminded that is easy question
Duncan
Author: Ron1959 replied at 2024-08-04 06:22:29
Yes, read access to all directories and files.
Expert: Rob Jurd replied at 2024-08-04 06:18:16
Check your permissions on the jQuery folders on localhost. Does your iis process have read access to these directories?
Author: Ron1959 replied at 2024-08-04 06:10:37
One more thought... I believe that a couple of months ago I could see at least the basic functionality of jQuery in Dreamweaver -- at least the tabs, etc.
Now instead of tabs, all I see is an unordered list.
Now instead of tabs, all I see is an unordered list.
Author: Ron1959 replied at 2024-08-04 06:05:21
I am using Window and XAMPP Apache server.
All files are inside the local site.
Paths to jQuery files are absolute, e.g. src=/jsfiles/jquery.js
Using Firebug, on the production server it lists the jQueryUI sources and lets me view the css.
On the localhost, Firebug lists the jQueryUI files, but does not display the css code. I think the problem is th at localhost isn't seeing the style sheets.
On localhost, Firebug does list the code for the style sheets I defined myself, though.
All files are inside the local site.
Paths to jQuery files are absolute, e.g. src=/jsfiles/jquery.js
Using Firebug, on the production server it lists the jQueryUI sources and lets me view the css.
On the localhost, Firebug lists the jQueryUI files, but does not display the css code. I think the problem is th at localhost isn't seeing the style sheets.
On localhost, Firebug does list the code for the style sheets I defined myself, though.
Expert: Scott Fell (padas) replied at 2024-08-03 22:02:43
>jquery does not work on localhost or in the design or live view in Dreamweaver.
It is most likely the way you have your site files set up in dreameaver.
Are you 100% sure your files in inside of the local site and the paths are correct. Try using a slash in from of the file and start from the site root. src=/jsfiles/jquery.js
Also you will not see javascript work in dreamweaver design view.
It is most likely the way you have your site files set up in dreameaver.
Are you 100% sure your files in inside of the local site and the paths are correct. Try using a slash in from of the file and start from the site root. src=/jsfiles/jquery.js
Also you will not see javascript work in dreamweaver design view.
Expert: duncanb7 replied at 2024-08-03 21:27:02
you can check by using browser debugging tool to test which pt or code in Jquery script
in where that is not working, and then send us the bug report that will help to do analysis
What system and server are you using (Linux and apache server or Window and XAMPP apache server or Window server) from
your prod server and locahost server respectively?
in where that is not working, and then send us the bug report that will help to do analysis
What system and server are you using (Linux and apache server or Window and XAMPP apache server or Window server) from
your prod server and locahost server respectively?