943,670 Members | Top Members by Rank

Ad:
Jan 16th, 2008
0

IE/IP/Javascript problem

Expand Post »
hi
odd problem with IE and Javascript?
when I open my pages using ip (and not host name) thier javascript functions and events dont
fire.
can any one help?
Last edited by raziane; Jan 16th, 2008 at 10:53 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raziane is offline Offline
23 posts
since Jan 2008
Jan 16th, 2008
0

Re: IE/IP/Javascript problem

> when I open my pages using ip (and not host name) thier javascript functions and events
> don't fire.
You mean http://xxx.xxx.xxx.xxx:8080/webapp/test.html over http://hostname:8080/webapp/test.html ?

> can any one help?
Use firefox to run your web app and look at the error console. (Tools -> Error Console)
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Jan 17th, 2008
0

Re: IE/IP/Javascript problem

first- thank u for your attention.
second- yes , using http://xxx.xxx.xxx.xxx:8080/webapp/test.html to access the page my javascript event dont fire and using http://hostname:8080/webapp/test.html there is no problem !
third- firefox has no problem in this case and javascript events fire correctly.

and I need the solution for IE , because of its popularity in my country.
Last edited by raziane; Jan 17th, 2008 at 7:09 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raziane is offline Offline
23 posts
since Jan 2008
Jan 17th, 2008
0

Re: IE/IP/Javascript problem

IP addresses as web addresses are obsolete.

1. Don't use IP addresses. Use of an IP address in a web address is usually a sign of sneakiness. Some firewalls block this (keeping your user from getting to your site). An IE security setting may be blocking this.

2. If you used a relative reference to the JS file, the browser expects to build the path to find the script by using the url of the current page. It gets lost when an IP address appears instead.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Jan 17th, 2008
0

Re: IE/IP/Javascript problem

hi MidiMagic
you are right , generally speaking , using IP instead of url is'nt a good method.
and I'm not using IP address usually.
in fact I want to demo a project, and to access my server it is required to use IP address.
and javascript events and function all are inline code, (not relative reference to the JS file)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raziane is offline Offline
23 posts
since Jan 2008
Jan 18th, 2008
0

Re: IE/IP/Javascript problem

It could still be a security setting. IP addresses are usually counted as not trusted, and so the security won't allow scripts.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Jan 20th, 2008
0

Re: IE/IP/Javascript problem

I removed any limitting security settings and the still the problem exists? !!!!!!!!! ?
any help ??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raziane is offline Offline
23 posts
since Jan 2008
Jan 20th, 2008
0

Re: IE/IP/Javascript problem

If it works in Firefox using IP then what is different in IE? Seems like a security setting could disable scripting across domains and consider "xxx.xxx.xxx.xxx" a "domain"? If your objects reference by DNS...different domain. Either way...defining the IP as a "local intranet site" and checking browser scripting permissions might be worth trying if you haven't already.
Reputation Points: 70
Solved Threads: 19
Posting Whiz
antioed is offline Offline
335 posts
since Jan 2004
Jan 21st, 2008
0

Re: IE/IP/Javascript problem

yes , it is a security problem , I added the ip address to trusted sites and now my events work.
thanks to antioed and MidiMagic
Last edited by raziane; Jan 21st, 2008 at 4:31 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raziane is offline Offline
23 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Why this does not works,. related to href and src
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Pass a 2D-array with AJAX





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC