I have madea website, which is pretty unfortunate. I was originally messing around for about 2 days, and came up with a great layout. The bad side is that the background is 1030px. If screen width is greater than 1030 (1024) then it shows up as blank space. I came up with some javascript code based on the trusty google.com. I want:
If screen width is less than 1024, print <a href="JSmedia.php">Continue</a>
Else <a href="javascript :popUp('JSmedia.php')">Continue</a> -
<script language='Javascript'>
-
<!--
-
windowheight=screen.height;
-
function popUp(URL) {
-
day = new Date();
-
id = day.getTime();
-
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=0,width=1032,height="+ windowheight +",left = 125,top = 0,title=js');");
-
}
-
if (screen.width <=1024){
-
---------------------------
-
}
-
else{
-
---------------------------
-
}
-
//-->
-
</script>
-
I don't know how to print/echo a link in javascript. the dashes represent the displayed links. That's where I am stuck.
4 10696
[HTML]document.write('<a href="xxxxxxx">xxxx</a>')[/HTML]
Ronald :cool:
Not Working :(. -
<script language='Javascript'>
-
<!--
-
bheight=screen.height;
-
-
function popUp(URL) {
-
day = new Date();
-
id = day.getTime();
-
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=0,width=1030,height=999,left = 125,top = 12.5');");
-
}
-
if (screen.width <=1024){
-
document.write('<a href="JSMedia.php">regular</a>')
-
}
-
else{
-
document.write('<a href="javascript:popUp(JSMedia.php);">popup</a>')
-
}
-
//-->
-
</script>
-
well, just the else document.write. I think its something to do with the href because it shows up as a link, just doesn't launch.
popUp(JSMedia.php)
needs to be
popUp("JSMedia.php")
or
popUp('JSMedia.php')
Sign in to post your reply or Sign up for a free account.
Similar topics
by: lawrence |
last post by:
Right now, over at www.monkeyclaus.org, the following script is
getting to the 9th run through and dying after the line:
echo "...";
You'll admit that is a strange place to die. I've hit...
|
by: Marco |
last post by:
I have a couple pages that have tables, whats best use echo to produce the
full table with the variables or is it best to just make the table in plain
html and use <?php echo ('$va'l); ?> when i...
|
by: qazmlp |
last post by:
I hope comp.lang.c will not find the following question as a
complete off-topic.
I would like to remove ie.comment out the 'cout' statements during
compilation(actually preprocessing) time.
...
|
by: Mastupristi |
last post by:
I want to obtain the c++ equivalent of:
unsigned short us = 347;
printf("0x%04hX",us);
that outputs "0x015B"
I ried with:
cout.setf(ios_base::hex,ios_base::basefield);
|
by: Joe C |
last post by:
I'd like to have better control of text output to the console. I'm using
Windows and have a little (non-standard) function to help me out:
#include <windows.h>
void locate(int x, int y )
{...
|
by: Domestos |
last post by:
Here an unusual one...
Say i am writing a few lines of code in php script as so...
<?php
echo '<table>';
echo '<tr>';
echo '<td> blah blah </td>';
echo '</tr>';
echo '</table>';
|
by: rawky1976 |
last post by:
Hi, I have a hyperlink which goes to the page below and passes the PK_ID from a query into 'userid'. From this we query the DB and then echo a table with a form; only the textboxes are already...
|
by: Mark Casternoff |
last post by:
I'm getting back into C++ after a long hiatus (they didn't have
namespaces back then).
I know this question is completely subjective, but I'd be interested in
hearing which is
the "better"...
|
by: Request-1 |
last post by:
hi folks,
html coder here, new and terrified * of php!!
aaaaaa!
i'm trying to bury a JS script to rotate a photo, in a page i converted from
html to php.
the conversion went well, it was to...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |