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.p hp">Continue</a>
Else <a href="javascrip t:popUp('JSmedi a.php')">Contin ue</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 10733
[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.
iam_clint 1,208
Recognized Expert Top Contributor
popUp(JSMedia.p hp)
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 refresh several
times and it keeps happening. When I view page source, the last thing
that shows up is the "...". The date doesn't print, nor does the
closing the div tag.
|
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 need to see some value.
Example i have tables like this
echo '<div align="',$align,'"><table border="0" cellpadding="2"
cellspacing="0" width="',$largeur,'">';
echo '<tr><td bgcolor="',$titre_bgcolor,'"><font face="',$titre_face,'"...
|
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.
The statements like this:
cout<<"something\n" ;
should be made as
|
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 )
{
COORD cur = { x, y };
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), cur );
}
| |
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 populated with the data from the query (in theory)!!!
But I get a blank page! I have error reporting on php and mysql but nothing is displayed?
<?php
echo "<form method=\"post\" action=\"\" style=\"padding-left: 10px\">";
...
|
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" style and what the pros and cons are (I'm using cout as
example, but it really
applies to any similar construct):
1) using std::cout;
|
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 use a php session cookie to stop the
repeating of an embedded video file on a per session basis;
i amended the php code to display a still pic if the session cookie value
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |