473,749 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=CustomHei ghtedStyle()
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 'CustomHeighted Style' is not declared.
Source Error:

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

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

and here's the HTML from the aspx page.

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

<body MS_POSITIONING= "GridLayout ">

<SCRIPT LANGUAGE=javasc ript>

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

</SCRIPT>

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

<DIV ID=divOverview
STYLE='<%=Cust omHeightedStyle ()%>'
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 2412
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=CustomHei ghtedStyle()
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 'CustomHeighted Style' is not declared.

Source Error:

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

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

and here's the HTML from the aspx page.

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

<body MS_POSITIONING= "GridLayout ">

<SCRIPT LANGUAGE=javasc ript>

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

</SCRIPT>

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

<DIV ID=divOverview
STYLE='<%=Cust omHeightedStyle ()%>'
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=CustomHei ghtedStyle()
>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 'CustomHeighted Style' is not declared.
>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE='<%=Custo mHeightedStyle( )%>'
>Line 42: align=center ms_positioning= "FlowLayout ">
>Line 43:
>
>#
>#
>############## #######
>
>
>
>and here's the HTML from the aspx page.
>
>
>
>############## ############### ##
>#
>#
>
><body MS_POSITIONING= "GridLayout ">
>
><SCRIPT LANGUAGE=javasc ript>
>
> function CustomHeightedS tyle()
> {
> var frmHeight = parent.ordersco ntrol.height
> var divHeight = frmHeight - 63
> var divStyle = "Z-INDEX: 102; " +
> "LEFT: 0px; " +
> "OVERFLOW: auto; " +
> "WIDTH: 100%; " +
> "POSITION: absolute; " +
> "TOP: 61px; HEIGHT: " +
> frmHeight.toStr ing() + "px"
> return divStyle
> }
>
></SCRIPT>
>
><form id=controls method=post runat="server">
>
><DIV ID=divOverview
>STYLE='<%=Cust omHeightedStyle ()%>'
>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=CustomHei ghtedStyle()
>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 'CustomHeighted Style' is not declared.
>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE='<%=Custo mHeightedStyle( )%>'
>Line 42: align=center ms_positioning= "FlowLayout ">
>Line 43:
>
>#
>#
>############## #######
>
>
>
>and here's the HTML from the aspx page.
>
>
>
>############## ############### ##
>#
>#
>
><body MS_POSITIONING= "GridLayout ">
>
><SCRIPT LANGUAGE=javasc ript>
>
> function CustomHeightedS tyle()
> {
> var frmHeight = parent.ordersco ntrol.height
> var divHeight = frmHeight - 63
> var divStyle = "Z-INDEX: 102; " +
> "LEFT: 0px; " +
> "OVERFLOW: auto; " +
> "WIDTH: 100%; " +
> "POSITION: absolute; " +
> "TOP: 61px; HEIGHT: " +
> frmHeight.toStr ing() + "px"
> return divStyle
> }
>
></SCRIPT>
>
><form id=controls method=post runat="server">
>
><DIV ID=divOverview
>STYLE='<%=Cust omHeightedStyle ()%>'
>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 programmaticall y. 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************ **@MAILpostmast er.co.uk> wrote in
message news:el******** ******@TK2MSFTN GP11.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=CustomHei ghtedStyle()
> >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 'CustomHeighted Style' is not declared.
> >
> >Source Error:
> >
> >Line 39:
> >Line 40: <DIV ID=divOverview
> >Line 41: STYLE='<%=Custo mHeightedStyle( )%>'
> >Line 42: align=center ms_positioning= "FlowLayout ">
> >Line 43:
> >
> >#
> >#
> >############## #######
> >
> >
> >
> >and here's the HTML from the aspx page.
> >
> >
> >
> >############## ############### ##
> >#
> >#
> >
> ><body MS_POSITIONING= "GridLayout ">
> >
> ><SCRIPT LANGUAGE=javasc ript>
> >
> > function CustomHeightedS tyle()
> > {
> > var frmHeight = parent.ordersco ntrol.height
> > var divHeight = frmHeight - 63
> > var divStyle = "Z-INDEX: 102; " +
> > "LEFT: 0px; " +
> > "OVERFLOW: auto; " +
> > "WIDTH: 100%; " +
> > "POSITION: absolute; " +
> > "TOP: 61px; HEIGHT: " +
> > frmHeight.toStr ing() + "px"
> > return divStyle
> > }
> >
> ></SCRIPT>
> >
> ><form id=controls method=post runat="server">
> >
> ><DIV ID=divOverview
> >STYLE='<%=Cust omHeightedStyle ()%>'
> >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
2956
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
8997
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
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,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
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, 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...
1
6801
isladogs
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...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2218
bsmnconsultancy
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...

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.