473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

external button

I have this table cell that is 150 pixels wide. In it I desire to call an
external javascript file to print on the screen, in this cell, a menu and to
jump to a page when the corresponding button is pressed. I am trying to have
all my button layout and linking happen in the javascript. I am wanting to
do this in javascript so I can easily add or delete page links by just
updating the javascript page instead of having to re-compile a java program
or change a bunch of html pages. Is this possible or am I just dreaming?

Thanks,
Thad
Feb 9 '07 #1
5 1508
"Thad" <ts*****@cox.netwrote in news:Me*************@newsfe17.phx:
I have this table cell that is 150 pixels wide. In it I desire to call
an external javascript file to print on the screen, in this cell, a
menu and to jump to a page when the corresponding button is pressed. I
am trying to have all my button layout and linking happen in the
javascript. I am wanting to do this in javascript so I can easily add
or delete page links by just updating the javascript page instead of
having to re-compile a java program or change a bunch of html pages.
Is this possible or am I just dreaming?
You are trying to emulate, using Javascript, what can be done by the web
server using "server side includes." It means that the server simply
includes a text file, containing the HTML menu, in the table cell. The
syntax for doing this depends on what OS your sever is running and what
scripting languages your server provides. For further info, Google (how
do I include html file inside another)

Feb 9 '07 #2
VK
On Feb 9, 3:28 am, "Thad" <tsob...@cox.netwrote:
I have this table cell that is 150 pixels wide. In it I desire to call an
external javascript file to print on the screen, in this cell, a menu and to
jump to a page when the corresponding button is pressed. I am trying to have
all my button layout and linking happen in the javascript. I am wanting to
do this in javascript so I can easily add or delete page links by just
updating the javascript page instead of having to re-compile a java program
or change a bunch of html pages. Is this possible or am I just dreaming?
With SSI as an obvious alternative,

<table ...>
...
<td>
<script src="menu.js"></script>
<noscript><p>Oopsy-poopsy... Script disabled...</p></noscript>
</td>
....

where menu.js prepares menu content and then document.write(it);

Feb 9 '07 #3

"VK" <sc**********@yahoo.comwrote in message
news:11**********************@a34g2000cwb.googlegr oups.com...
On Feb 9, 3:28 am, "Thad" <tsob...@cox.netwrote:
>I have this table cell that is 150 pixels wide. In it I desire to call an
external javascript file to print on the screen, in this cell, a menu and
to
jump to a page when the corresponding button is pressed. I am trying to
have
all my button layout and linking happen in the javascript. I am wanting
to
do this in javascript so I can easily add or delete page links by just
updating the javascript page instead of having to re-compile a java
program
or change a bunch of html pages. Is this possible or am I just dreaming?

With SSI as an obvious alternative,

<table ...>
...
<td>
<script src="menu.js"></script>
<noscript><p>Oopsy-poopsy... Script disabled...</p></noscript>
</td>
...

where menu.js prepares menu content and then document.write(it);
Nice....very nice. I had it working then arachnofilia started bugging out
on me and I lost my data. Starting over again, but I understand where you
are coming from.

Thanks a bunch.
Thad
Feb 10 '07 #4
I don't see anything wrong with this code. Just by looking, can you see
anything wrong?

document.write("<Button Type=Button style=\"width:180;height:25\"
style="background-color:#4ae3ec\" onClick=navigate(\"makeu5503.html\")>" +
Make One + "</Button>") ;

If code looks ok then I have to investigate further. External js page is
called like this...

<script type="text/javascript" src = "menujs.js">
</script>

The file is saved under menujs.js so I see nothing wrong but no button
shows...any suggestions?

Thanks,
Thad

Feb 10 '07 #5
Hah....answered my own question by playing with if for quite a while....

document.write("<Button Type=Button style=\"width:180;height:25\"
style=\"background-color:#4ae3ec\" onClick=navigate(\"makeu5503.html\")>
Make One </Button>") ;

Two double quotes had to be taken out...waaahhhhoooo.
"Thad" <ts*****@cox.netwrote in message
news:M0*****************@newsfe16.phx...
>I don't see anything wrong with this code. Just by looking, can you see
anything wrong?

document.write("<Button Type=Button style=\"width:180;height:25\"
style="background-color:#4ae3ec\" onClick=navigate(\"makeu5503.html\")>" +
Make One + "</Button>") ;

If code looks ok then I have to investigate further. External js page is
called like this...

<script type="text/javascript" src = "menujs.js">
</script>

The file is saved under menujs.js so I see nothing wrong but no button
shows...any suggestions?

Thanks,
Thad

Feb 10 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sachy | last post by:
Hi, I have received following error in my ASP.NET application. Many of buttons on the different pages are generating this error. I am not sure what I did until this morning code was working...
1
by: Aged | last post by:
Hi I have asked several groups now for advise but I feel I must be confusing either them or myself, but anyway here goes! Below is code taken from the "OnClick" function of a command button...
1
by: Kristina Foxwell | last post by:
Hello: I am currently having problems with an ASP.NET page...I've never programmed in ASP or HTML so all of this is new to me. I have a table that contains a list of files. The columns are a...
3
by: Brian Bischof | last post by:
I'm having troubles getting the debugging process to work consistenly for external classes. I got it to work once and then I turned it off. But now I can't get re-enabled. Here is what I'm doing....
1
by: cvairetti | last post by:
Hi, I just write an application in C# that show an interface with five button, each button starts an external application that it comes in front of the main C# application with focus on. When the...
2
by: lpcarignan | last post by:
Hi all, Right now, I'm debugging a C# library by starting an external application. To do this, I go in the project settings of the C# project, go in the Debug section and check the radio button...
6
by: mikes8arms | last post by:
Version: Flash MX (A.S. 2.0) Hello. I haven't posted since signing on a few weeks ago. I've searched your site seeking an answer or answers to the concept of creating a "close button" for my...
0
by: wez03 | last post by:
Hi everyone.. I got a problem in loading an external txt into my dynamic text. It says that there are no error in my script but when I publish it, the only thing seen in the text field is...
2
by: iamdennis | last post by:
Hi all. I stuck here and need some help. I have created a combo box which contains a list of links to external PDF files. I also created a OPEN command button next to the combo box. I want to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
0
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
0
BarryA
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.