Monday, March 26, 2012

My early adoption experiences.

Hi guys, this is my first post here.

I'm developing a Portuguese Travel Agency website, asp.net 2.0 powered backed by filemaker 7 server database.http://www.queroviagens.com is the original website without atlas features. I have atlas powered version herehttp://www.queroviagens.com/queroviagens/test.aspx with autocomplete in a textbox, and without postback having partial updates instead.

I have some triggers on 2 hidden buttons that make the choices, and in the javascript tree and other links i call a javascript function that puts in hidden textboxes the values of the selected Id's and make a button.click() so it can raise the event.

One thing i would like to do is to have distinct progressbars, one for each updatepanel, and not only one. Is it possible yet ?

Another thing: let's supose i want to update the javascript tree, and I have a webservice that returns the javascript code. I can inject that in a span but it will not load. Any javascript code is not executed. Any way to fix it ?

Thanks in advance, and happy coding

hello.

well, i'm assuming that you want 2 distinct progress bars so that the info message is different. if this is the case, you don't really need two bars since you can change what's shown with code similar to this one:

<%

@.PageLanguage="C#" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

scriptrunat="server">void h(object sender,EventArgs args)

{

info.Text = ((

Button)sender).ID +" " +DateTime.Now.ToString();

System.Threading.

Thread.Sleep(2000);

}

</

script>

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server"><title>Untitled Page</title>

</

head>

<

body><formid="form1"runat="server"><atlas:ScriptManagerrunat="server"id="manager"EnablePartialRendering="true"></atlas:ScriptManager><atlas:UpdatePanelrunat="server"ID="panel"><ContentTemplate><asp:Buttonrunat="server"ID="bt"Text="Submit"OnClick="h"/><asp:Literalrunat="server"ID="info"/></ContentTemplate></atlas:UpdatePanel><atlas:UpdatePanelrunat="server"ID="UpdatePanel1"><ContentTemplate><asp:Buttonrunat="server"ID="bt2"Text="Submit"OnClick="h"/><asp:Literalrunat="server"ID="Literal1"/></ContentTemplate></atlas:UpdatePanel><atlas:updateprogressrunat="server"ID="prog1"><ProgressTemplate>

progress 1

</ProgressTemplate></atlas:updateprogress><scripttype="text/xml-script">

<page xmlns:script=

"http://schemas.microsoft.com/xml-script/2005">

<components>

<button id=

"bt">

<click>

<setProperty target=

"prog1" property="associatedElement" propertyKey="innerText" value="updatePanel1" />

</click>

</button>

<button id=

"bt2">

<click>

<setProperty target=

"prog1" property="associatedElement" propertyKey="innerText" value="updatePanel2" />

</click>

</button>

</components>

</page>

</script></form>

</

body>

</

html>
Totally off-topic reply but...

I like the javascript-powered treeview for the "Escolha o Destino" menu. Is it a third-party control or...?

Thanks,

-Benton
Hi Bento. Its a free javascript script:
http://www.softcomplex.com/products/tigra_menu_tree/

But in pageload I dynamic build the tree, with contents of database, and in the link item i put a javascript function i created EscolheDestino(123);

this EscolheDestino what it does is :

function EscolheDestino(val){

var t = document.getElementById('DestinoId');
t.value=val;
document.form1.btnEscolher.click();
}

So it puts the chosen Id in a hidden textbox field (DestinoId), and forces a hidden button (btnEscolher) to be clicked. This button is in the trigger of an update panel, and the datalist with the current offers for that destination are refreshed.

The problem I have is that the .click() does not raise the Click event on firefox. I will try change it to _dopostback() function to see if it fits.

Best regards

hello again.

sorry, i don't understand? what do you mean?


It's a free javascript available at:

http://www.softcomplex.com/products/tigra_menu_tree/

In pageload i dynamically generate the tree and in the link of each node i put a javscript function

EscolheDestino(id)

function EscolheDestino(val){

var t = document.getElementById('DestinoId');
t.value=val;

document.form1.btnEscolher.click();

}

What it does is selecting an id to a hidden textfield and simulate a click on a hidden button. This button is in a trigger that refreshes the datalist control.

The only problem is that this method of using .click() in firefox does not raise the Click event :|

No comments:

Post a Comment