# Simple JScript ?

**URL:** https://boards.straightdope.com/t/simple-jscript/190940
**Category:** Factual Questions
**Created:** [July 25, 2003, 7:18pm UTC](https://boards.straightdope.com/t/simple-jscript/190940 "2003-07-25T19:18:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)
#### Post date: [July 25, 2003, 7:18pm UTC](https://boards.straightdope.com/t/simple-jscript/190940/1 "2003-07-25T19:18:35Z")

</div>

I have some simple javascript that is returning some ambiguous results.

The first time the link is selected, the ‘Query’ frame loads roadnamequery.htm. No problem. However, the status bar at the bottom of the browser (IE 6)gets stuck at about half way. If I select the link again, the status bar clears. Every time the link is selected, the status switches back and forth from stuck at half way, to clear.

This is the gist of the code.

\<script language=“javascript”\>  
function CheckTheme(theme)  
{  
parent.Query.document.location=theme + “.htm”;  
}  
\</script\>

\<a\>a href=“javascript:CheckTheme(‘roadnamequery’);”\>Property Address\</a\>

Thanks -

---

<div class="post-metadata">

### Author: ![DoubleJ](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DoubleJ](https://boards.straightdope.com/u/DoubleJ)
#### Post date: [July 25, 2003, 8:33pm UTC](https://boards.straightdope.com/t/simple-jscript/190940/2 "2003-07-25T20:33:10Z")

</div>

If that’s all there is to the function, then I really don’t know. But if you have any document.write()s in there, that’s probably what’s causing it. Call document.close() after you’re done and see if that helps.

---

<div class="post-metadata">

### Author: ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)
#### Post date: [July 25, 2003, 8:58pm UTC](https://boards.straightdope.com/t/simple-jscript/190940/3 "2003-07-25T20:58:13Z")

</div>

Nope, no document.write(). And I modified the .html that is called (roadnamequery.htm) to be some very simple html script. Nothing in that is hanging.

Pretty strange.

Thanks

---

<div class="post-metadata">

### Author: ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)
#### Post date: [July 25, 2003, 9:19pm UTC](https://boards.straightdope.com/t/simple-jscript/190940/4 "2003-07-25T21:19:44Z")

</div>

Why don’t you upload it and give us the URL?

---

<div class="post-metadata">

### Author: ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)
#### Post date: [July 25, 2003, 11:03pm UTC](https://boards.straightdope.com/t/simple-jscript/190940/5 "2003-07-25T23:03:09Z")

</div>

> [@](#):
>
> \*Originally posted by Achernar \*  
> \*\*Why don’t you upload it and give us the URL? \*\*

The app is designed to be an intrAnet.

If I get a chance to play with it this weekend on my home computer, I’ll post results.

Anyway, it’s nothing fancy, just a primary frame with 5 or 6 frames. One frame uses an HTML anchor to call the Jscript function to load a very simple HTML page in a different frame.

Thanks again.

---

<div class="post-metadata">

### Author: ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)
#### Post date: [July 26, 2003, 2:02am UTC](https://boards.straightdope.com/t/simple-jscript/190940/6 "2003-07-26T02:02:01Z")

</div>

Well, I re-wrote the basic code at home and it works. Different operating version (98 vs 2000, and IE 5.5 instead of 6). Doubt the systems difference would make a difference.

Burnt it and will compare to code at work on Monday.

I’ll let you know when I find out what the heck it is.

Thanks- enipla (alpine)
