Ask a Question related to ASP.NET General, Design and Development.
-
PJ #1
Re: javascript causing line breaks
for something like this I usuallly define a function at the bottom of the
page:
<!-- bottom of page -->
function openNotes(key) {
var windowFeatures = 'scrollbars=no,width=480,height=300';
var ExtendedNotes_window = window.open('extendednotes.aspx?key=' +
key,'ExtendedNotes_window', windowFeatures);
ExtendedNotes_window.focus();
}
<!-- in page -->
<asp:textbox id="txtDetails" maxlength="20" readonly="true"
class="soft"></asp:textbox>
'code behind
Dim txtDetails As TextBox = CType(e.Item.FindControl("txtDetails"), TextBox)
txtDetails.Attributes.Add("onclick", "javascript:openNotes('" + key + "')")
"Sasha Shevelev" <sashashev@hotmail.com> wrote in message
news:Ojb$aIEWDHA.2224@TK2MSFTNGP09.phx.gbl...TextBox)> Hi there,
>
> I can;t believe no one else has had this prob but here goes...
>
> I add some javascript into my page and asp.net sometimes (not always) puts
> the js into my page with a line break rendering it useless...
>
>
> Here is my code...
>
> Dim txtDetails As TextBox = CType(e.Item.FindControl("txtDetails"),key> 'Create the javascript string
>
> strJS =
> "javascript:ExtendedNotes_window=window.open('exte ndednotes.aspx?key=" &"','ExtendedNotes_window','scrollbars=no,width=480 ,height=300');ExtendedNote> &
>onClick="javascript:ExtendedNotes_window=window.op en('extendednotes.aspx?key> s_window.focus()"
>
> txtDetails.Attributes.Add("onClick", strJS)
>
>
>
> Here is the source wjhen it runs.....
>
> When it works the source code looks like (take wrapping off) - <input
> name="dgrdTimeSheet:_ctl2:txtDetails" type="text" maxlength="20"
> readonly="readonly" id="dgrdTimeSheet__ctl2_txtDetails" class="soft"
>=18C2B4EB-F8B3-462B-AB74-7307D54DBEF7','ExtendedNotes_window','scrollbars=n o>/>> ,width=480,height=300');ExtendedNotes_window.focus ()" style="width:80px;"onClick="javascript:ExtendedNotes_window=window.op en('extendednotes.aspx?key>
> When it doesn't - <input name="dgrdTimeSheet:_ctl2:txtDetails" type="text"
> maxlength="20" readonly="readonly" id="dgrdTimeSheet__ctl2_txtDetails"
> class="soft"
>','ExtendedNotes_window','scrollbars=no,width=480, height=300');ExtendedNotes> =18C2B4EB-F8B3-462B-AB74-7307D54DBEF7
>guy> _window.focus()" style="width:80px;" />
>
> This obviously causes unterminated string constant. It's not the editor I
> view my source in either. I saw another posting similar to mine and the> had checked all the characters but no one provided an answer to him.
>
> This is really urgent. Can anyone help????
>
> Thanks,
>
> Sasha
>
>
>
>
>
>
>
>
>
>
>
PJ Guest
-
PHP deletes .swf line breaks
Hi all - I have a designed a Flash based interface to send email via PHP. I capture the variables in Flash using: var my_lv:LoadVars=new... -
Getting line breaks between words
Is there a way to have InDesign wrap to a new line between words? Here's why ... I'm working on a VDP (Variable Data Printing) project of an eye... -
Get rid of uselses line breaks?
Greetings, I noticed when I use design mode on Dreamweaver to input text, I get too many line breaks on the source code. Is there a way to... -
In correct line breaks in ID2.0J
Our company produces manuals in several different European languages and as most of the operators are Japanese we use a Japanese version of ID. The... -
Line Breaks (DB APP)
What server model are you using? ASP? PHP? CF? -- Dave ----------------------------------------------------------------- If I were half as... -
Sasha Shevelev #2
Re: javascript causing line breaks
Thx fixed,
but why does .net put the line break in?
It can;t be a length thing cause it doesn't always happen.
Pretty poor.
Cheers,
Sasha
"PJ" <pjwal@hotmail.com> wrote in message
news:u1MX3nHWDHA.1368@TK2MSFTNGP11.phx.gbl...TextBox)> for something like this I usuallly define a function at the bottom of the
> page:
>
> <!-- bottom of page -->
> function openNotes(key) {
> var windowFeatures = 'scrollbars=no,width=480,height=300';
> var ExtendedNotes_window = window.open('extendednotes.aspx?key=' +
> key,'ExtendedNotes_window', windowFeatures);
> ExtendedNotes_window.focus();
> }
>
> <!-- in page -->
> <asp:textbox id="txtDetails" maxlength="20" readonly="true"
> class="soft"></asp:textbox>
>
> 'code behind
> Dim txtDetails As TextBox = CType(e.Item.FindControl("txtDetails"),"')")> txtDetails.Attributes.Add("onclick", "javascript:openNotes('" + key +puts>
>
> "Sasha Shevelev" <sashashev@hotmail.com> wrote in message
> news:Ojb$aIEWDHA.2224@TK2MSFTNGP09.phx.gbl...> > Hi there,
> >
> > I can;t believe no one else has had this prob but here goes...
> >
> > I add some javascript into my page and asp.net sometimes (not always)"','ExtendedNotes_window','scrollbars=no,width=480 ,height=300');ExtendedNote> TextBox)> > the js into my page with a line break rendering it useless...
> >
> >
> > Here is my code...
> >
> > Dim txtDetails As TextBox = CType(e.Item.FindControl("txtDetails"),> key> > 'Create the javascript string
> >
> > strJS =
> > "javascript:ExtendedNotes_window=window.open('exte ndednotes.aspx?key=" &>> > &
> >onClick="javascript:ExtendedNotes_window=window.op en('extendednotes.aspx?key>> > s_window.focus()"
> >
> > txtDetails.Attributes.Add("onClick", strJS)
> >
> >
> >
> > Here is the source wjhen it runs.....
> >
> > When it works the source code looks like (take wrapping off) - <input
> > name="dgrdTimeSheet:_ctl2:txtDetails" type="text" maxlength="20"
> > readonly="readonly" id="dgrdTimeSheet__ctl2_txtDetails" class="soft"
> >=18C2B4EB-F8B3-462B-AB74-7307D54DBEF7','ExtendedNotes_window','scrollbars=n o>> >style="width:80px;"> > ,width=480,height=300');ExtendedNotes_window.focus ()"type="text"> />> >
> > When it doesn't - <input name="dgrdTimeSheet:_ctl2:txtDetails"onClick="javascript:ExtendedNotes_window=window.op en('extendednotes.aspx?key>> > maxlength="20" readonly="readonly" id="dgrdTimeSheet__ctl2_txtDetails"
> > class="soft"
> >','ExtendedNotes_window','scrollbars=no,width=480, height=300');ExtendedNotes>> > =18C2B4EB-F8B3-462B-AB74-7307D54DBEF7
> >I> > _window.focus()" style="width:80px;" />
> >
> > This obviously causes unterminated string constant. It's not the editor> guy> > view my source in either. I saw another posting similar to mine and the>> > had checked all the characters but no one provided an answer to him.
> >
> > This is really urgent. Can anyone help????
> >
> > Thanks,
> >
> > Sasha
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
Sasha Shevelev Guest



Reply With Quote

