|
Quick question does anyone here know how to use an EXISTING microsoft ajax control toolkit extender (i.e CollapsablePanelExtender) or an Ajax server control (i.e Accordian) in a customer server control?
Everything i Google is how to either write your own ajax server controls or ajax control extenders. I guess i could do that if i had to but i would really love to avoid reinventing the wheel here.
Any help is appreciated.
AJAX Toolkit = GOOD;
Custom Server Controls = GOOD;
Custom Server Controls + AJAX Toolkit = WTF????
It's monday and i'm frustrated.
Thanks for the help everyone.
Ryan Strope
Web Department
(Web Developer)
Cyber City Computers
Quidquid latine dictum sit, altum videtur
|
|
|
|
|
You want to use an Ajax control in your user control. Is it?
I believe, it is the same way as you would have done for the page.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
No no SERVER control.
If I needed help using my mouse to drag and drop to make a User Control I should just be drug out back to the server room and shot.
I know the general pieces I need (Implemented IScriptControl, set up my script references and descriptors)
The problem is they have plenty of examples around on writing your own AJAX controls with your own java scripts and how to reference them.
I need to know how do i attach the existing AJAX server controls from the Microsoft AJAX Toolkit to my own Custom Server Controls. i.e. how do i wire up the Script References and Descriptors to say the CollapsiblePanelExtender or the Accordian (and it's children) controls so they will function inside my custom server controls.
Ryan Strope
Web Department
(Web Developer)
Cyber City Computers
Quidquid latine dictum sit, altum videtur
|
|
|
|
|
Long-time lurker has a question:
A client wants AJAX collapsible panels on his site pages to collapse page text so as not to overwhelm people who come to the info-laden site. The panels would each have a header that can be clicked to expand to show the text.
The Web is full of confusing info as to how make these SEO-friendly. Some say to leave the text as is within the panel and it will be searched, while other say you need to have a <noscript> option that duplicates the text in the panel.
Suggestions? Anyone know of any collapsible panel code that degrades nicely and would possibly make this a non-issue?
Thanks in advance for your help. I greatly appreciate it.
|
|
|
|
|
Well, according to me it is always better to write a <noscript> tag for any page so that it would be consistent to all users(even thought there are so less no of users who dont have javascript enabled in browser).
Regarding Accordion panel,
build it yourself. Just create the panels using Div's in such a way that by default all are open. After the script is loaded properly, just apply a script to change the display properties of each of them at a time.
See the Codeproject is developed in similar fashion. If you go to settings page, It loads all parts in flat basis, until body onload / final script block is invoked and the control is configured to look like tabs.
Thus even if the javascript is not there, and the onload function cant be called, the page can easily scrolled down to see everything.
I think this would be the best approach..
If you want any 3rd party control on this, let me know.
cheers
|
|
|
|
|
Dear developers,
I have to implement the image upload functionality in javascript. I got more examples, but i expect to upload the image or photo "without showing the input field". Example, i have the button "Add/Change image". I don't want to show the input field to bind the file.
can you guys give any idea or suggestion?..
Thanks,
Periyasamy.
|
|
|
|
|
What do you mean ?
You can show image in img tag. To upload, you need to browse using file control and upload the files to the server. .Just show the image by calling
img.src = url
and you are done. When you change the url of img.src it will automatically call the server and update the image in the browser.
Upload file needs postback.
[Note : I left out flash or any browser based plugins]
|
|
|
|
|
May be handy to tell that when you have your html image tag <img src="/images/image.jpg" id="myPicture" alt="My picture" /> you'll be able to use the image object in Javascipt using the getElementById() function :
var myImage = document.getElemtnById('myPicture');
if (myImage)
myImage.src = "/images/image2.jpg";
|
|
|
|
|
Perfect...
|
|
|
|
|
I have a error in learning Ajax lessons.
The error is "UpdatePanel does not contain a definition for ContentTemplateContainer".
Following is my codes:
public partial class UpdatePanel1 : System.Web.UI.Page
{
private Label label1;
protected void Page_Load(object sender, EventArgs e)
{
UpdatePanel l_UpdatePanel = new UpdatePanel();
l_UpdatePanel.ID = "UpdatePanel1";
//Create the label
label1 = new Label();
label1.ID = "Label1";
label1.Text = DateTime.Now.ToString();
//Create the button
Button l_Button = new Button();
l_Button.ID = "Button1";
l_Button.Click += new EventHandler(l_Button_Click);
//Create the literals
LiteralControl l_LiteralControl = new LiteralControl();
//Embed the controls to the UpdatePanel
l_UpdatePanel.ContentTemplateContainer.Controls.Add(label1);
l_UpdatePanel.ContentTemplateContainer.Controls.Add(l_LiteralControl);
l_UpdatePanel.ContentTemplateContainer.Controls.Add(l_Button);
//Add the update panel to the form
this.Controls.Add(l_UpdatePanel);
}
void l_Button_Click(object sender, EventArgs e)
{
this.label1.Text = DateTime.Now.ToString();
}
}
|
|
|
|
|
|
I have added a PNG image on a existing HTML page. This image don't get displayed on IIS5 when I try to launch this page initially. This images dont get displayed at all Problem is other PNG on same HTML page get displayed.With right click on image I get the correct path of image but no information about size and type is "Not Available". And more on this, HTML page has a button to change src of this newly added PNG image.When I click on this button new image get displayed on HTML page without any issue. This seems to be strange problem. In case any of you encountered such problem, Please help me out.
Thanks in advance.
One more thing On apache server everything works fine.
modified on Monday, November 16, 2009 12:39 AM
|
|
|
|
|
Check if you can directly paste the url in address bar and see if image is loading properly?
There must be some problem with the url I think.
|
|
|
|
|
Is this issue related with any particular browser ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
thanks all,
I resolved the issue by reconfigure everything.
|
|
|
|
|
Hi,I have installed PHP5.3.0 under IIS5 and Windows XP.It runs properly.
But whenever I tried to install PHP55.3.0 under IIS6 and Windows Server 2003,it always throws an error which says "<b>CGI Error:The specified CGI application misbehaved by not returning a complete set of HTTP headers</b>".I have followd the same steps which i did while installing PHP5.3.0 under IIS5 and Windows XP.But invain.Can anyone help me?
CC26
|
|
|
|
|
|
Cross-Post
You only need to post once, in one forum. most of the php guys check the web dev forum.
|
|
|
|
|
Hi,
I have installed PHP 5.3.0 under IIS 5.1 and windows xp.
I also installed phpMyAdmin.It was working properly.Suddenly it started giving the following error :
could not start session without errors....
But surprisingly this problem comes when I call the page from local machine.But if I call the page from other machine it runs properly.
Can anyone help?
Thanks and regards
CC26
|
|
|
|
|
|
Can I place the POST values at the end of a JSP Internet address, so it acts like a HTML page (or another JSP) called it. Example: www.myscript/test.jspXXXXXXXX Where XXXXX is additional information that test.jsp normally gets when invoked by the POST method.
|
|
|
|
|
Of course... The Post value you are talking about are QueryStrings.
|
|
|
|
|
What I’m trying to achieve is process an address with the POST information attached to the IP address http://zip4.usps.com/zip4/zcl_0_results.jsp. This JSP is called by hitting the SUBMIT button on http://zip4.usps.com/zip4/welcome.jsp. But I would like to bypass welcome.jsp and call zcl_0_results.jsp directly.
|
|
|
|
|
Why dont you use client side script to redirect. Do you really need serverside redirection. If so, there must be an equivalent to Response.Redirect in JSP too.
Or you use
location.href = 'zcl_0_results.jsp';
from Window onload to Welcome.jsp.
|
|
|
|
|
The zcl_0_results.jsp file resides on the USPS Company's public web site, but I would like to invoke it from my web page. When I invoke the file, I need to have the necessary POST fields passed to zcl_0_results.jsp such as city=”New York”, state="NY", etc. Can I do this is my first question. If so, can you supply a code sample?
|
|
|
|