User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,219 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,245 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1110 | Replies: 8 | Solved
Reply
Join Date: Jan 2008
Posts: 5
Reputation: raziane is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raziane raziane is offline Offline
Newbie Poster

IE/IP/Javascript problem

  #1  
Jan 16th, 2008
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 9:53 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,863
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: IE/IP/Javascript problem

  #2  
Jan 16th, 2008
> 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)
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Jan 2008
Posts: 5
Reputation: raziane is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raziane raziane is offline Offline
Newbie Poster

Re: IE/IP/Javascript problem

  #3  
Jan 17th, 2008
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 6:09 am.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 115
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: IE/IP/Javascript problem

  #4  
Jan 17th, 2008
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.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jan 2008
Posts: 5
Reputation: raziane is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raziane raziane is offline Offline
Newbie Poster

Re: IE/IP/Javascript problem

  #5  
Jan 17th, 2008
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)
Reply With Quote  
Join Date: Jan 2007
Posts: 2,556
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 115
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: IE/IP/Javascript problem

  #6  
Jan 18th, 2008
It could still be a security setting. IP addresses are usually counted as not trusted, and so the security won't allow scripts.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jan 2008
Posts: 5
Reputation: raziane is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raziane raziane is offline Offline
Newbie Poster

Re: IE/IP/Javascript problem

  #7  
Jan 20th, 2008
I removed any limitting security settings and the still the problem exists? !!!!!!!!! ?
any help ??
Reply With Quote  
Join Date: Jan 2004
Location: Washington DC
Posts: 335
Reputation: antioed has a spectacular aura about antioed has a spectacular aura about 
Rep Power: 6
Solved Threads: 16
antioed's Avatar
antioed antioed is offline Offline
Posting Whiz

Re: IE/IP/Javascript problem

  #8  
Jan 20th, 2008
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.
Reply With Quote  
Join Date: Jan 2008
Posts: 5
Reputation: raziane is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raziane raziane is offline Offline
Newbie Poster

Re: IE/IP/Javascript problem

  #9  
Jan 21st, 2008
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 3:31 am.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:18 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC