473,396 Members | 1,846 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,396 software developers and data experts.

javascript function not executing...

Are you getting confused between client and server?

Should it be:

Source Error:

Line 39:
Line 40: <DIV ID=divOverview
Line 41: STYLE=CustomHeightedStyle()
Line 42: align=center ms_positioning="FlowLayout">
Line 43:

HTH,
Gaz
-----Original Message-----
I'm trying to set the height of a DIV through the style, by using the frame(orderscontrol) height and subtracting a buffer space used for some buttonsbut the function in the script tags doesn't even run. I get the error...
##################
#
#

Compilation Error
Description: An error occurred during the compilation of a resource requiredto service this request. Please review the following specific error detailsand modify your source code appropriately.

Compiler Error Message: BC30451: Name 'CustomHeightedStyle' is not declared.
Source Error:

Line 39:
Line 40: <DIV ID=divOverview
Line 41: STYLE='<%=CustomHeightedStyle()%>'
Line 42: align=center ms_positioning="FlowLayout">
Line 43:

#
#
#####################

and here's the HTML from the aspx page.

###############################
#
#

<body MS_POSITIONING="GridLayout">

<SCRIPT LANGUAGE=javascript>

function CustomHeightedStyle()
{
var frmHeight = parent.orderscontrol.height
var divHeight = frmHeight - 63
var divStyle = "Z-INDEX: 102; " +
"LEFT: 0px; " +
"OVERFLOW: auto; " +
"WIDTH: 100%; " +
"POSITION: absolute; " +
"TOP: 61px; HEIGHT: " +
frmHeight.toString() + "px"
return divStyle
}

</SCRIPT>

<form id=controls method=post runat="server">

<DIV ID=divOverview
STYLE='<%=CustomHeightedStyle()%>'
align=center ms_positioning="FlowLayout">

....some stuff...

</DIV></FORM></BODY>

</HTML>

#
#
###############################

I've tried usnig the "javascript:" prefix in the element tag, but then theerror reads that 'javascript' is undefined.
your help is appreciated, thanks
Dan.
.

Nov 17 '05 #1
4 2385
doesn't it have to be client side since i want to get the containment
frame's height, then apply that to a DIV attribute?

"Gary Varga" <MS**@VargaLtd.freeserve.co.uk> wrote in message
news:0c****************************@phx.gbl...
Are you getting confused between client and server?

Should it be:

Source Error:

Line 39:
Line 40: <DIV ID=divOverview
Line 41: STYLE=CustomHeightedStyle()
Line 42: align=center ms_positioning="FlowLayout">
Line 43:


HTH,
Gaz
-----Original Message-----
I'm trying to set the height of a DIV through the style,

by using the frame
(orderscontrol) height and subtracting a buffer space

used for some buttons
but the function in the script tags doesn't even run. I

get the error...

##################
#
#

Compilation Error
Description: An error occurred during the compilation of

a resource required
to service this request. Please review the following

specific error details
and modify your source code appropriately.

Compiler Error Message: BC30451:

Name 'CustomHeightedStyle' is not declared.

Source Error:

Line 39:
Line 40: <DIV ID=divOverview
Line 41: STYLE='<%=CustomHeightedStyle()%>'
Line 42: align=center ms_positioning="FlowLayout">
Line 43:

#
#
#####################

and here's the HTML from the aspx page.

###############################
#
#

<body MS_POSITIONING="GridLayout">

<SCRIPT LANGUAGE=javascript>

function CustomHeightedStyle()
{
var frmHeight = parent.orderscontrol.height
var divHeight = frmHeight - 63
var divStyle = "Z-INDEX: 102; " +
"LEFT: 0px; " +
"OVERFLOW: auto; " +
"WIDTH: 100%; " +
"POSITION: absolute; " +
"TOP: 61px; HEIGHT: " +
frmHeight.toString() + "px"
return divStyle
}

</SCRIPT>

<form id=controls method=post runat="server">

<DIV ID=divOverview
STYLE='<%=CustomHeightedStyle()%>'
align=center ms_positioning="FlowLayout">

....some stuff...

</DIV></FORM></BODY>

</HTML>

#
#
###############################

I've tried usnig the "javascript:" prefix in the element

tag, but then the
error reads that 'javascript' is undefined.
your help is appreciated, thanks
Dan.
.

Nov 17 '05 #2
Exactly!!!

That is why I removed the <%= %> from around the CLIENT
side function as it does not exist on the SERVER yet the
<% %> surrounds SERVER code.

(I used capitals as emphasis - not slight is intended).

HTH,
Gaz
-----Original Message-----
doesn't it have to be client side since i want to get the containmentframe's height, then apply that to a DIV attribute?

"Gary Varga" <MS**@VargaLtd.freeserve.co.uk> wrote in messagenews:0c****************************@phx.gbl...
Are you getting confused between client and server?

Should it be:
>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE=CustomHeightedStyle()
>Line 42: align=center ms_positioning="FlowLayout">
>Line 43:
>


HTH,
Gaz
>-----Original Message-----
>I'm trying to set the height of a DIV through the
style, by using the frame
>(orderscontrol) height and subtracting a buffer space

used for some buttons
>but the function in the script tags doesn't even run.
I get the error...
>
>##################
>#
>#
>
>Compilation Error
>Description: An error occurred during the compilation
of a resource required
>to service this request. Please review the following

specific error details
>and modify your source code appropriately.
>
>Compiler Error Message: BC30451:

Name 'CustomHeightedStyle' is not declared.
>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE='<%=CustomHeightedStyle()%>'
>Line 42: align=center ms_positioning="FlowLayout">
>Line 43:
>
>#
>#
>#####################
>
>
>
>and here's the HTML from the aspx page.
>
>
>
>###############################
>#
>#
>
><body MS_POSITIONING="GridLayout">
>
><SCRIPT LANGUAGE=javascript>
>
> function CustomHeightedStyle()
> {
> var frmHeight = parent.orderscontrol.height
> var divHeight = frmHeight - 63
> var divStyle = "Z-INDEX: 102; " +
> "LEFT: 0px; " +
> "OVERFLOW: auto; " +
> "WIDTH: 100%; " +
> "POSITION: absolute; " +
> "TOP: 61px; HEIGHT: " +
> frmHeight.toString() + "px"
> return divStyle
> }
>
></SCRIPT>
>
><form id=controls method=post runat="server">
>
><DIV ID=divOverview
>STYLE='<%=CustomHeightedStyle()%>'
>align=center ms_positioning="FlowLayout">
>
>....some stuff...
>
></DIV></FORM></BODY>
>
></HTML>
>
>#
>#
>###############################
>
>I've tried usnig the "javascript:" prefix in the
element tag, but then the
>error reads that 'javascript' is undefined.
>your help is appreciated, thanks
>Dan.
>
>
>.
>

.

Nov 17 '05 #3
This ain't working...
I'll scrap the javascript idea.
All I want to do is have a control, header section across the top of a page,
then a DIV beneath it so that the control doesn't scroll, but the DIV in the
rest of the body does. In other words, simulating frame behaviour with a top
banner/control static section and scrollable view beneath it with DIV tags.
The problem is DIV doesn't automattically take up the remaining space so the
idea behind my javascript was have something like

the height of the DIV element = the height of the frame - the height of
my control panel

is there another way around this? I goto the help section in the style sheet
say, and the help page does what i want to do, so i look at the source there
and it also uses DIV's, but I can't replicate the behaviour...

thanks again.
Dan.
"Gary Varga" <MS**@VargaLtd.freeserve.co.uk> wrote in message
news:0a****************************@phx.gbl...
Exactly!!!

That is why I removed the <%= %> from around the CLIENT
side function as it does not exist on the SERVER yet the
<% %> surrounds SERVER code.

(I used capitals as emphasis - not slight is intended).

HTH,
Gaz
-----Original Message-----
doesn't it have to be client side since i want to get

the containment
frame's height, then apply that to a DIV attribute?

"Gary Varga" <MS**@VargaLtd.freeserve.co.uk> wrote in

message
news:0c****************************@phx.gbl...
Are you getting confused between client and server?

Should it be:

>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE=CustomHeightedStyle()
>Line 42: align=center ms_positioning="FlowLayout">
>Line 43:
>

HTH,
Gaz

>-----Original Message-----
>I'm trying to set the height of a DIV through the style, by using the frame
>(orderscontrol) height and subtracting a buffer space
used for some buttons
>but the function in the script tags doesn't even run. I get the error...
>
>##################
>#
>#
>
>Compilation Error
>Description: An error occurred during the compilation of a resource required
>to service this request. Please review the following
specific error details
>and modify your source code appropriately.
>
>Compiler Error Message: BC30451:
Name 'CustomHeightedStyle' is not declared.
>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE='<%=CustomHeightedStyle()%>'
>Line 42: align=center ms_positioning="FlowLayout">
>Line 43:
>
>#
>#
>#####################
>
>
>
>and here's the HTML from the aspx page.
>
>
>
>###############################
>#
>#
>
><body MS_POSITIONING="GridLayout">
>
><SCRIPT LANGUAGE=javascript>
>
> function CustomHeightedStyle()
> {
> var frmHeight = parent.orderscontrol.height
> var divHeight = frmHeight - 63
> var divStyle = "Z-INDEX: 102; " +
> "LEFT: 0px; " +
> "OVERFLOW: auto; " +
> "WIDTH: 100%; " +
> "POSITION: absolute; " +
> "TOP: 61px; HEIGHT: " +
> frmHeight.toString() + "px"
> return divStyle
> }
>
></SCRIPT>
>
><form id=controls method=post runat="server">
>
><DIV ID=divOverview
>STYLE='<%=CustomHeightedStyle()%>'
>align=center ms_positioning="FlowLayout">
>
>....some stuff...
>
></DIV></FORM></BODY>
>
></HTML>
>
>#
>#
>###############################
>
>I've tried usnig the "javascript:" prefix in the element tag, but then the
>error reads that 'javascript' is undefined.
>your help is appreciated, thanks
>Dan.
>
>
>.
>

.

Nov 17 '05 #4
If you set your div to runat server, you can control all attributes and
styles in it programmatically. I believe that will give you all the control
you need from the server side.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.

"(Liquid) Daniel Bass" <da**************@MAILpostmaster.co.uk> wrote in
message news:el**************@TK2MSFTNGP11.phx.gbl...
This ain't working...
I'll scrap the javascript idea.
All I want to do is have a control, header section across the top of a page, then a DIV beneath it so that the control doesn't scroll, but the DIV in the rest of the body does. In other words, simulating frame behaviour with a top banner/control static section and scrollable view beneath it with DIV tags. The problem is DIV doesn't automattically take up the remaining space so the idea behind my javascript was have something like

the height of the DIV element = the height of the frame - the height of
my control panel

is there another way around this? I goto the help section in the style sheet say, and the help page does what i want to do, so i look at the source there and it also uses DIV's, but I can't replicate the behaviour...

thanks again.
Dan.
"Gary Varga" <MS**@VargaLtd.freeserve.co.uk> wrote in message
news:0a****************************@phx.gbl...
Exactly!!!

That is why I removed the <%= %> from around the CLIENT
side function as it does not exist on the SERVER yet the
<% %> surrounds SERVER code.

(I used capitals as emphasis - not slight is intended).

HTH,
Gaz
-----Original Message-----
doesn't it have to be client side since i want to get

the containment
frame's height, then apply that to a DIV attribute?

"Gary Varga" <MS**@VargaLtd.freeserve.co.uk> wrote in

message
news:0c****************************@phx.gbl...
> Are you getting confused between client and server?
>
> Should it be:
>
> >
> >Source Error:
> >
> >Line 39:
> >Line 40: <DIV ID=divOverview
> >Line 41: STYLE=CustomHeightedStyle()
> >Line 42: align=center ms_positioning="FlowLayout">
> >Line 43:
> >
>
> HTH,
> Gaz
>
> >-----Original Message-----
> >I'm trying to set the height of a DIV through the

style,
> by using the frame
> >(orderscontrol) height and subtracting a buffer space
> used for some buttons
> >but the function in the script tags doesn't even run.

I
> get the error...
> >
> >##################
> >#
> >#
> >
> >Compilation Error
> >Description: An error occurred during the compilation

of
> a resource required
> >to service this request. Please review the following
> specific error details
> >and modify your source code appropriately.
> >
> >Compiler Error Message: BC30451:
> Name 'CustomHeightedStyle' is not declared.
> >
> >Source Error:
> >
> >Line 39:
> >Line 40: <DIV ID=divOverview
> >Line 41: STYLE='<%=CustomHeightedStyle()%>'
> >Line 42: align=center ms_positioning="FlowLayout">
> >Line 43:
> >
> >#
> >#
> >#####################
> >
> >
> >
> >and here's the HTML from the aspx page.
> >
> >
> >
> >###############################
> >#
> >#
> >
> ><body MS_POSITIONING="GridLayout">
> >
> ><SCRIPT LANGUAGE=javascript>
> >
> > function CustomHeightedStyle()
> > {
> > var frmHeight = parent.orderscontrol.height
> > var divHeight = frmHeight - 63
> > var divStyle = "Z-INDEX: 102; " +
> > "LEFT: 0px; " +
> > "OVERFLOW: auto; " +
> > "WIDTH: 100%; " +
> > "POSITION: absolute; " +
> > "TOP: 61px; HEIGHT: " +
> > frmHeight.toString() + "px"
> > return divStyle
> > }
> >
> ></SCRIPT>
> >
> ><form id=controls method=post runat="server">
> >
> ><DIV ID=divOverview
> >STYLE='<%=CustomHeightedStyle()%>'
> >align=center ms_positioning="FlowLayout">
> >
> >....some stuff...
> >
> ></DIV></FORM></BODY>
> >
> ></HTML>
> >
> >#
> >#
> >###############################
> >
> >I've tried usnig the "javascript:" prefix in the

element
> tag, but then the
> >error reads that 'javascript' is undefined.
> >your help is appreciated, thanks
> >Dan.
> >
> >
> >.
> >
.


Nov 17 '05 #5

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

Similar topics

8
by: frohlinger | last post by:
Hi, I have a search textbox in my website. I validate the search string with a "white list" of allowed characters: if((/^+$/).test(theSearchWord) == false) { return; }
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: 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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...

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.