Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
IFrame Problems

 
Post new topic   Reply to topic    dna88 Forum Index -> Web design and solution Discussion Forum
Author Message
Guest






Post Post subject: IFrame Problems Reply with quote

I have a Javascript on one web page and the results of that script are taken to another page in a Iframe. The problem is, the text reults from the Javascript produce a link, but when I click on that link, the new page opens in the Iframe.

The Javascript on page date.htm is this:

Code:
calendar = new Date();
day = calendar.getDay();
month = calendar.getMonth();
date = calendar.getDate();
year = calendar.getYear();
if (year< 100) year = 1900 + year;
cent = parseInt(year/100);
g = year % 19;
k = parseInt((cent - 17)/25);
i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
j = (year + parseInt(year/4) + i + 2 - cent + parseInt(cent/4)) % 7;
l = i - j;
emonth = 3 + parseInt((l + 40)/44);
edate = l + 28 - 31*parseInt((emonth/4));
emonth--;
var dayname = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var monthname =
new Array ("January","February","March","April","May","June","July","August","September","October","November","December" );
document.write(dayname[day]+", ");
document.write(date+" ");
document.write(monthname[month]+" ");
document.write(+"2007");
// January is month 0
if ((month == 0) && (date == 1))
document.write(" - <a href='mar9.htm'>St. John Oglivie</a> ");


My inline frame is on index.htm.

Any ideas how I can get the link from the script to open in its own window instead of the inline frame?

Please help! I am pretty new at all this.

Many thanks.
Fri Mar 09, 07 7:22 pm
Back to top
Guest
Guest






Post Post subject: Re: IFrame Problems Reply with quote

please add here target attribute and set the value as '_parent'-

Code:
document.write(" - <a href='mar9.htm' target='_parent'>St. John Oglivie</a> ");



Thanks,

http://www.kernelbd.com
Sat Mar 10, 07 6:44 am
Back to top
Guest
Guest






Post Post subject: Re: IFrame Problems Reply with quote

That works great. Thank you so very much. Works a treat now!
Sat Mar 10, 07 7:46 am
Back to top
Guest
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Web design and solution Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group