/    Sign up×
Community /Pin to ProfileBookmark

browser compatibility

i have the following code inside my JSP:

<script language=”Javascript”>
openPopup(‘../setup/prepareReport.do?actionKey=fromLink&objType=<%=objType %>&rfId=<%=rfId %>&fileName=<%=fileName %>&process=PRINT’,'<%=rfName%>’,’scrollbars=yes,width=400,height=350′);
</script>

the above code will call this method:
function openPopup(theURL,winName,features) {
features = features+”, resizable = yes”;
popupWindow = window.open(theURL,winName,features);
popupWindow.document.title=winName;
}

what i’m trying to do is to set the browser title of the popup screen. it was working fine with mozilla firefox 1.0, but when i try to open the popup using IE 6.0, it gives me an “Invalid argument” error. The error seems to come from >> popupWindow.document.title=winName;

izzit due to browser compatibality problem? coz when i open the popup using mozilla firefox 5.0 on linux system, it is even showing the correct title on the popup.

could anybody give me a hint on how to solve this?
thx in advance !!

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@CharlesJan 06.2005 — Please post the URL but note, feature cannot contain spaces.
Copy linkTweet thisAlerts:
@vassilisaauthorJan 07.2005 — it was working fine all along, until i added the line popupWindow.document.title=winName; into the openPopup function.

thx for taking ur time to look at my problem.
Copy linkTweet thisAlerts:
@CharlesJan 07.2005 — You are getting an "Invalid argument" error. The only line with an argument is [font=monospace]popupWindow = window.open(theURL,winName,features);[/font]. That line contains an invalid argument. Perhaps you inadvertantly changed line [font=monospace]features = features+", resizable = yes";[/font] when you added the line you suspect.

Posting the URL would help.
Copy linkTweet thisAlerts:
@vassilisaauthorJan 18.2005 — thx for the reply.

I've found that the error is actually due to white space inside the parameter that i've passed into as the window name, eg:

var winName="ABC Report";

popupWindow = window.open(theURL,winName,features);

popupWindow.document.title=winName;

the winName shd not contain any white space, tt's y it's been causing problem.
Copy linkTweet thisAlerts:
@CharlesJan 18.2005 — [i]Originally posted by vassilisa [/i]

[B]the winName shd not contain any white space, tt's y it's been causing problem. [/B][/QUOTE]
Which is what I've been trying to tell you.
Copy linkTweet thisAlerts:
@senshiJan 18.2005 — So what happend to the URL?

Do people actually comprehend posts ?
×

Success!

Help @vassilisa spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...