Ask a Question related to ASP.NET General, Design and Development.
-
Gary Varga #1
javascript function not executing...
Are you getting confused between client and server?
Should it be:
HTH,>
>Source Error:
>
>Line 39:
>Line 40: <DIV ID=divOverview
>Line 41: STYLE=CustomHeightedStyle()
>Line 42: align=center ms_positioning="FlowLayout">
>Line 43:
>
Gaz
by using the frame>-----Original Message-----
>I'm trying to set the height of a DIV through the style,used for some buttons>(orderscontrol) height and subtracting a buffer spaceget the error...>but the function in the script tags doesn't even run. Ia resource required>
>##################
>#
>#
>
>Compilation Error
>Description: An error occurred during the compilation ofspecific error details>to service this request. Please review the followingName 'CustomHeightedStyle' is not declared.>and modify your source code appropriately.
>
>Compiler Error Message: BC30451:tag, but then the>
>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>error reads that 'javascript' is undefined.
>your help is appreciated, thanks
>Dan.
>
>
>.
>Gary Varga Guest
-
Executing JavaScript in a PDF using .Net
I have a VB6 "report manager" application, and some of the reports are written into Adobe Acrobat documents. Basically, these documents all have a... -
javascript split function
I'm using the split method to put values into an array. When I pass in the argument to the function and then use the split method, the delimiters... -
Javascript function in Flash
Hello, i have a flash menu, but i want to open a javascript popup. How can i use this function that i'll use for TML in flash? <SCRIPT... -
executing a shell command within a function
Hi, I’m coding a function that will create a set of directories using execution of shell commands within the function. Then the function saves... -
Javascript print function
Hi Is there a javascript print function that will work on a mac??I have put one on my page and it works fine on pc but when on mac the link does... -
\(Liquid\) Daniel Bass #2
Re: javascript function not executing...
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" <MSNG@VargaLtd.freeserve.co.uk> wrote in message
news:0c2301c34d1f$5963e630$a401280a@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
>> by using the frame> >-----Original Message-----
> >I'm trying to set the height of a DIV through the style,> used for some buttons> >(orderscontrol) height and subtracting a buffer space> get the error...> >but the function in the script tags doesn't even run. I> a resource required> >
> >##################
> >#
> >#
> >
> >Compilation Error
> >Description: An error occurred during the compilation of> specific error details> >to service this request. Please review the following> Name 'CustomHeightedStyle' is not declared.> >and modify your source code appropriately.
> >
> >Compiler Error Message: BC30451:> tag, but then the> >
> >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> >error reads that 'javascript' is undefined.
> >your help is appreciated, thanks
> >Dan.
> >
> >
> >.
> >
\(Liquid\) Daniel Bass Guest
-
Gary Varga #3
Re: javascript function not executing...
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
the containment>-----Original Message-----
>doesn't it have to be client side since i want to getmessage>frame's height, then apply that to a DIV attribute?
>
>"Gary Varga" <MSNG@VargaLtd.freeserve.co.uk> wrote instyle,>news:0c2301c34d1f$5963e630$a401280a@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 theI>> by using the frame>> used for some buttons>> >(orderscontrol) height and subtracting a buffer space>> >but the function in the script tags doesn't even run.of>> get the error...>> >
>> >##################
>> >#
>> >#
>> >
>> >Compilation Error
>> >Description: An error occurred during the compilationelement>> a resource required>> specific error details>> >to service this request. Please review the following>> Name 'CustomHeightedStyle' is not declared.>> >and modify your source code appropriately.
>> >
>> >Compiler Error Message: BC30451:>> >
>> >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>>> tag, but then the>> >error reads that 'javascript' is undefined.
>> >your help is appreciated, thanks
>> >Dan.
>> >
>> >
>> >.
>> >
>
>.
>Gary Varga Guest
-
\(Liquid\) Daniel Bass #4
Re: javascript function not executing...
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" <MSNG@VargaLtd.freeserve.co.uk> wrote in message
news:0a0501c34d27$17d76040$a601280a@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
>> the containment> >-----Original Message-----
> >doesn't it have to be client side since i want to get> message> >frame's height, then apply that to a DIV attribute?
> >
> >"Gary Varga" <MSNG@VargaLtd.freeserve.co.uk> wrote in> style,> >news:0c2301c34d1f$5963e630$a401280a@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> I> >> 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.> of> >> get the error...
> >> >
> >> >##################
> >> >#
> >> >#
> >> >
> >> >Compilation Error
> >> >Description: An error occurred during the compilation> element> >> 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> >> >> tag, but then the
> >> >error reads that 'javascript' is undefined.
> >> >your help is appreciated, thanks
> >> >Dan.
> >> >
> >> >
> >> >.
> >> >
> >
> >.
> >
\(Liquid\) Daniel Bass Guest
-
Kevin Spencer #5
Re: javascript function not executing...
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
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"(Liquid) Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in
message news:elib7jSTDHA.1664@TK2MSFTNGP11.phx.gbl...page,> 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 athe> then a DIV beneath it so that the control doesn't scroll, but the DIV intop> rest of the body does. In other words, simulating frame behaviour with atags.> banner/control static section and scrollable view beneath it with DIVthe> The problem is DIV doesn't automattically take up the remaining space sosheet> 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 stylethere> say, and the help page does what i want to do, so i look at the source> and it also uses DIV's, but I can't replicate the behaviour...
>
> thanks again.
> Dan.
>
>
> "Gary Varga" <MSNG@VargaLtd.freeserve.co.uk> wrote in message
> news:0a0501c34d27$17d76040$a601280a@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
> >> > the containment> > >-----Original Message-----
> > >doesn't it have to be client side since i want to get> > message> > >frame's height, then apply that to a DIV attribute?
> > >
> > >"Gary Varga" <MSNG@VargaLtd.freeserve.co.uk> wrote in> > style,> > >news:0c2301c34d1f$5963e630$a401280a@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> > I> > >> 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.> > of> > >> get the error...
> > >> >
> > >> >##################
> > >> >#
> > >> >#
> > >> >
> > >> >Compilation Error
> > >> >Description: An error occurred during the compilation> > element> > >> 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> > >> tag, but then the
> > >> >error reads that 'javascript' is undefined.
> > >> >your help is appreciated, thanks
> > >> >Dan.
> > >> >
> > >> >
> > >> >.
> > >> >
> > >
> > >
> > >.
> > >
>
Kevin Spencer Guest



Reply With Quote

