•
•
•
•
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 362,347 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 4,866 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: 1763 | Replies: 3
![]() |
The computer I am currently on:
Windows XP SP2
Internet Explorer 7
That's all you really need to know.
I use Javascript a lot, but recently, I have traveled over into the more application programming, and less web programming. I opened my father's laptop, and typed in a pretty *long* Javascript. I saved as javescript.html and tryed to open it in IE7. It has the thing at the top saying "Script wasn't opened" so I clicked "Run script" and it disappeared, but all the page had on it was nothing. I tried it in a bunch of ways, all with no luck. So, I went over to W3SCHOOLS and copied one of their codes:
I tried to run it, still, a blank page. Then, I tried this script (way more basic):
Still, a blank page. Is there some error that I am just NOT seeing, or is it IE7? I have no idea if it's IE, because my dad doesn't want Firefox on this computer. Once I get my Linux box back, I'll try it on that.
Any help would be appreciated! I want to get back to Javascript!
-- Alex
Windows XP SP2
Internet Explorer 7
That's all you really need to know.
I use Javascript a lot, but recently, I have traveled over into the more application programming, and less web programming. I opened my father's laptop, and typed in a pretty *long* Javascript. I saved as javescript.html and tryed to open it in IE7. It has the thing at the top saying "Script wasn't opened" so I clicked "Run script" and it disappeared, but all the page had on it was nothing. I tried it in a bunch of ways, all with no luck. So, I went over to W3SCHOOLS and copied one of their codes:
<html>
<body>
<script type="text/javascript">
//If the time is less than 10,
//you will get a "Good morning" greeting.
//Otherwise you will get a "Good day" greeting.var d = new Date()
var time = d.getHours()
if (time < 10)
{
document.write("Good morning!")
}
else
{
document.write("Good day!")
}
</script>
</body>
</html>I tried to run it, still, a blank page. Then, I tried this script (way more basic):
<html>
<body>
<script type="text/javascript">
<!--
document.write("Testing...")
//-->
</script>
</body>
</html>Still, a blank page. Is there some error that I am just NOT seeing, or is it IE7? I have no idea if it's IE, because my dad doesn't want Firefox on this computer. Once I get my Linux box back, I'll try it on that.
Any help would be appreciated! I want to get back to Javascript!
-- Alex
Toshiba M115 ● 1.49 GB DDR-2 RAM ● 1.6 GHz Centrino Duo ● 80GB HDD ● Windows XP Media Center Edition
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 916
Reputation:
Rep Power: 4
Solved Threads: 45
hm... i haven't used IE7 very much, and I don't use it home or I'd check that out... but, try something even more simple:
if that doesn't work, then JS may be disabled... there is an option to disable it, but I'm pretty sure the default is enabled... Have a look in all the options dialogs for reference to 'letting pages run scripts'
there's always a more 'strict' environment on local pages/scripts than on pages that are on a webserver. i guess that's because web scripts have request access to their immediate locality.. and you wouldn't want to download a script that had request access to your filesystem... so, if all else fails, try uploading the script somewhere to test it.
<html>
<body onload="alert('Javascript is functioning correctly');">
</body>
</html>there's always a more 'strict' environment on local pages/scripts than on pages that are on a webserver. i guess that's because web scripts have request access to their immediate locality.. and you wouldn't want to download a script that had request access to your filesystem... so, if all else fails, try uploading the script somewhere to test it.
If it only works in Internet Explorer; it doesn't work.
It's gotta be IE7, because I tried the same script on my Linux box using Firefox, Epiphany, and Opera, and they all worked.
I have to check into that.
Also, in IE7, when moving checkboxes around on the page, they always change back to their original state (checked, unchecked). I find this frustrating.
I have to check into that.
Also, in IE7, when moving checkboxes around on the page, they always change back to their original state (checked, unchecked). I find this frustrating.
Toshiba M115 ● 1.49 GB DDR-2 RAM ● 1.6 GHz Centrino Duo ● 80GB HDD ● Windows XP Media Center Edition
•
•
Join Date: Jan 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
I grabbed IE7 as soon as it came out, so I am fairly proficient at it. I'm typing this post with it.
Try this.
>> Open Internet Options. To do so, either click Tools > Internet options from the menu bar (if the menu bar is not visible, press ALT to make it visible) or click the little gear icon near the right (on the same bar that the tabs reside) and select Internet Options from it. Either way, I O will be the bottom-most option.
>> Select Security.
>> Select Custom Level... (the button).
>> In ActiveX controls and plug-ins, run down to "Automatic prompting for ActiveX controls" and select "Enable".
>> In "Scripting", select "Enable" for "Active scripting" (the option is just underneath the header).
>> Hit OK.
>> Select Advanced.
>> Go down to Security.
>> Enable both "Allow active content from CDs to run from My Computer*" (as a convenience) and "Allow active content to run in files on My Computer*" (this is the big one).
>> You would have noticed the stars next to those options, meaning that for them to take effect you have to restart IE (not the whole PC!). Close down all instances of IE, and re-open.
>> Test the script...
>> ... and then post how well it works. (Don't post that it didn't work, okay?!!)
Try this.
>> Open Internet Options. To do so, either click Tools > Internet options from the menu bar (if the menu bar is not visible, press ALT to make it visible) or click the little gear icon near the right (on the same bar that the tabs reside) and select Internet Options from it. Either way, I O will be the bottom-most option.
>> Select Security.
>> Select Custom Level... (the button).
>> In ActiveX controls and plug-ins, run down to "Automatic prompting for ActiveX controls" and select "Enable".
>> In "Scripting", select "Enable" for "Active scripting" (the option is just underneath the header).
>> Hit OK.
>> Select Advanced.
>> Go down to Security.
>> Enable both "Allow active content from CDs to run from My Computer*" (as a convenience) and "Allow active content to run in files on My Computer*" (this is the big one).
>> You would have noticed the stars next to those options, meaning that for them to take effect you have to restart IE (not the whole PC!). Close down all instances of IE, and re-open.
>> Test the script...
>> ... and then post how well it works. (Don't post that it didn't work, okay?!!)
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
ajax asp beta blog blogging bon browser capable ccna computer dell developer development echo email encryption firefox home internet javascript linux mcse microsoft mozilla msdn networking news nintendo office opera operating opinions patch preinstall privacy programming security site software source sql system testing upgrade vista web webmail wii windows xp
- Javascript links not working (Web Browsers)
- Need help with Javascript (JavaScript / DHTML / AJAX)
- Javascript browser detection (and then if IE activate script) (JavaScript / DHTML / AJAX)
- Javascript browser checker and script activator (JavaScript / DHTML / AJAX)
- javascript links freezing/lagging computer. (Web Browsers)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: how to access innerhtml element
- Next Thread: JavaScript problem in FF


Linear Mode