|
This looks like an ASP.NET 2.0 AJAX thing, see the post a few posts below yours for a link.
|
|
|
|
|
how to connect crystal report with asp?
Haresh Bogani
|
|
|
|
|
how to connect crystal report with asp?
Haresh Bogani
|
|
|
|
|
i want to show a pop window at page load time...
i am using it in an asp application....
some one plz write the javascript and help me....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
Use the body onload event.
No, I won't write the code for you but it is a simple matter to accomplish.
Literally a function with a single line of code if you don't want to style it and only a few lines if you want to customize it.
See HTML DOM createPopup() Method[^]
|
|
|
|
|
Or better yet, just don't use popups! they are the bane of every web user and should be avoided at all costs!
|
|
|
|
|
Here are the files:
Calling page:
<script type="text/javascript">
function getProduct() {
var xmlHttp, myurl;
myurl = "edit/vs_sprite.php";
try { xmlHttp=new XMLHttpRequest();
}
catch (e) {
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function() {
if(xmlHttp.readyState==4) {
document.getElementById("product_box").innerHTML=xmlHttp.responseText;
} else {
document.getElementById("product_box").innerHTML="please wait...";
}
}
xmlHttp.open("GET",myurl,false);
xmlHttp.send(null);
}
var c=0;
var t;
var tm=1;
function timedCount() {
getProduct();
c=c+1;
t=setTimeout("timedCount()",tm);
tm=12000;
}
timedCount();
</script>
<div id="product_box" class="right_content">
<p class="titles">Virtual Showroom</p>
<p class="copy"><a href="index.php?p=4">[CLICK HERE ]</a> to see all of our vehicles.</p>
</div>
Code for vs_sprite.php:
<?php
require_once('../Connections/myconn.php');
mysql_select_db($database_MoElev, $MoElev);
$query_rs = "SELECT * FROM vehicle ORDER BY rand() LIMIT 1";
$rs = mysql_query($query_rs, $MoElev) or die(mysql_error());
$row_rs = mysql_fetch_assoc($rs);
?>
<br />
<p class=titles>Virtual Showroom</p>
<p class="copy">
<a href="index.php?p=22&vehicleid=<?php echo $row_rs['id']; ?>">
<?php
$id = $row_rs['id'];
$query_rsp = "SELECT link FROM tblImages WHERE vid = $id";
$rsp = mysql_query($query_rsp, $MoElev) or die(mysql_error());
$row_rsp = mysql_fetch_assoc($rsp);
?>
<img src="edit/<?php echo $row_rsp['link']; ?>" border=0 style="height:75px;width:100px;">
</a>
<br />
<span class="smallcopy"><?php echo $row_rs['title']; ?></span><br />
<span class="smallcopy">Price: $<?php echo $row_rs['price']; ?></span>
</p>
<p class="copy"><a class="more" href="index.php?p=22&vehicleid=<?php echo $row_rs['id']; ?>">more info</a></p>
<p class="copy"><a href="index.php?p=4">[CLICK HERE ]</a> to see all of our vehicles.</p>
In IE7, the refresh keeps pulling the same record from the database, but with Firefox, it pulls a random record, as it is supposed to. Any ideas?
Bart A. Edgerton
www.ewebdev.net
|
|
|
|
|
Sorry, all the code in my thread post is meant to be server-side. So if there is not a RUNAT="Server" in the SCRIPT tag then I just forgot and it should be written. Please have in mind this is all to do with server-side scripting.
How can VBScript code access JScript code variables in the same ASP page?
Dim a
a = 10
Response.Write(a);
Also, is this valid JScript code because ASP hasn't complained.
function Section(a, b, c, d) {
this.a = a;
this.memFunction = function() {
this.a = this.a + 1;
}
}
Basically it's like JScript's way of declaring classes.
How can VBScript code create a Section object?
Dim obj
obj = new Section 'Error, says cannot find Section
obj = new Section() 'Error again
obj = new Section(1, 2, 3, 4) 'Error again
Also, is it possible to nest tag inside <% %>? Like:
<%
'Some VBScript code
Class AClass
Private a
Function b()
End Function
%>
<%
End Class
%>
where JScript.asp has:
<SCRIPT LANGUAGE="JScript">
function Section() {
function Section2() {
}
}
ASP didn't complain. But couldn't test whether the JScript functions Section were member functions of the VBScript AClass.
-- modified at 5:07 Monday 18th June, 2007
|
|
|
|
|
Hi Andrew
You're pushing the boundaries a bit on this one!
andrewwan1980 wrote: How can VBScript code access JScript code variables in the same ASP page?
It looks like Microsoft is using the same underlying script engine to service both VBScript and JavaScript. I am not sure it is something that you should rely upon.
andrewwan1980 wrote: How can VBScript code create a Section object?
I had some luck with the following code:
<SCRIPT LANGUAGE="JScript">
function Section(a, b, c, d) {
this.a = a;
this.memFunction = function() {
this.a = this.a + 1;
}
return(this) ;
}
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
Dim obj
set obj = Section(1, 2, 3, 4)
MsgBox(obj.a)
call obj.memFunction()
MsgBox(obj.a)
</SCRIPT> VBScript allows proper constructors - way-cool!
andrewwan1980 wrote: Also, is it possible to nest tag inside <% %>? Like:</blockquote>
I would expect that it is valid - but I'll let you try that one out
Regards
Andy
|
|
|
|
|
I have some code:
-------Javascript ------------
...
function SavePosition(source)
{
// Call AJAX request to save
//var url = "Home.aspx?order=" + getPositionOrder();
url = "Home.aspx?order=0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12"
var objXmlHttp = createXMLHTTP();
objXmlHttp.open("GET", url, true);
if(objXmlHttp == null)
{
alert("Browser does not support HTTP request!");
return;
}
ShowWarning(source, waitingHTML);
objXmlHttp.onreadystatechange = function()
{
if (objXmlHttp.readyState == 4)
{
if(objXmlHttp.status == 200)
{
setTimeout("complete()", 2000);
}
else
{
alert("Error while trying to save.");
}
}
}
objXmlHttp.send(null);
}
...
---- Home.aspx.cs ---
...
private void Page_Load(object sender, System.EventArgs e)
{ // Put user code to initialize the page here
if (Request["order"] != null)
{
SavePositionOrder(Request["order"].ToString());
}
}
OK,
I have a button on file Home.aspx.
I click the button first, my web is done. But when I click the second the home.aspx seems not load because page_load function don't execute.
Thanks
Live 2 Code
Code 2 Get Money
Money 2 Love
Love to Live
|
|
|
|
|
Hello,
I created a form which is built mostly with ordered lists:
http://www.27lamps.com/public/Beta.htm
I am having a few problems. All of them inside a DIV to which I am applying the class "ListBox"
1. ListBox is not being applied to the child tags of that DIV, i.e., OL and LI. They have the styles defined by parent class.
How can I solve this?
2. My second problem is how to clear floats on my ol.
I applied the overflow approach to my OL tag but this does not seem to work.
Note that I am trying to display 3 LI per row simulating a table.
Could someone, please, help me out?
And I am open to any suggestion which might improve my CSS on this form.
I have been working on this for quite a while but I know I can still improve it.
Thank You,
Miguel
|
|
|
|
|
shapper wrote: http://www.27lamps.com/public/Beta.htm
1. You can define styles for the ol and li elements with .ListBox ol, and .ListBox ol li. Some styles are not inherited and you will need to explictly define them
2. Floats can be cleared with the 'clear: both' CSS attribute
|
|
|
|
|
Everything he said:
also, li elements are block elements by default, so be sure to do something like this if you want them to appear on the same row:
.ListBox ol li { display:inline; margin-right:1em; }
Good Luck!
Bart Edgerton
www.ewebdev.net
|
|
|
|
|
Hi,
Problem: I have a web application that is tied into a Windows Workflow that tracks orders. In the portion of the application that allows the user to set/reset the state of an order I have a gridview and a formview. The gridview displays the meat of the order data as stored in the database, and the formview is where I'd like to store the buttons that will perform the updates and progress the order states.....etc.
I'd like to set the visibility of the different buttons in the formview dependant on the current state of the Workflow. I can get the current state of the order no problem from the gridview's OnItemCreated event.
I've tried to access the FormView control via: FormView fv = this.Page.FindControl("fvOrderState") as FormView; but hitherto I am unable to get any reaction from the FormView.
I would appreciate any and all suggestions and/or leads for this problem.
Thank you.
An American football fan -
Go Seahawks!
Lil Turtle
|
|
|
|
|
Have you called the formview.DataBind event after changes? In my use of hte formview that has usually been the problem. So when the data or dependancies change you have to databind the formview for the changes to show up.
Hope that helps.
Ben
|
|
|
|
|
Even if I don't have any dynamic data, just buttons within the control, I still need to databind the control?
Thanks for the reply BTW
An American football fan -
Go Seahawks!
Lil Turtle
|
|
|
|
|
Yes, I believe so. I haven't done exactly what you are trying to do, but in my case I always had to rebind to get the formview to change. Hope that helps.
Ben
|
|
|
|
|
I tried to bind the FormView, with no luck
I solved the problem by statically declaring a GridView column to be Visible depending on the state of the order, but I don't like having to to do this.
Thanks for the replies.
An American football fan -
Go Seahawks!
Lil Turtle
|
|
|
|
|
When the component COM+ access a WebServices through the Soap Toolkit (version 3.0), the messages below are generated:
Soap error: One of the parameters supplied is invalid
Soap error: Loading of the WSDL file failed
Soap error: XML Parser failed at linenumber 1,lineposition 0, reason is:No data is avaliable for the request resource
Architecture: Windows DNA, Vb6 + ASP + Oracle
WebServices: Soap Toolkit versão 3.0
|
|
|
|
|
I have this made
http://moosplayhouse.com/webice/addresses/addresses.htm
how do i attach or make the submit save the information on the forms work? or be stored?
Please help
|
|
|
|
|
theimmortalmoo wrote: http://moosplayhouse.com/webice/addresses/addresses.htm
You should set the forms 'method' attribute to be POST. Then, when you press submit, the data for the form will be sent to your readform.php script where you can read the data from the global $_POST array and do something with it
|
|
|
|
|
Hey everyone. I have never worked with HTML much let alone ActiveX controls. I've created a catalog program for my workplace which has information on every component we make. I added a function in the program which converts the catalog into a web page with links to other pages for each component. This works great and all the pages are perfect. However, I'd like the pages for the components to display an interactive 3D model and I have the Myriad 3D viewer which is supposed to be easily embeddable into a web page. It includes 2 dll files which it states are ActiveX controls, but I have no idea how to get them to work. I've researched on the internet for hours and I can't even begin to think of how to start it. Can anyone please help me?
-- modified at 12:33 Thursday 14th June, 2007
|
|
|
|
|
Hi,
Iam working in a webapplication in which I am using RSA cookie authentication to login. I login using secure RSA ID in which i login using different users with different Tokens such as Admin , client etc.., for ex.. if i login using Admin account and RSA pincode i have to redirect to a different destination page than that of the client account's destination page. The thing is that i have written RSA secured Cookie for login in a page called Authorize.aspx as follows in the HTML page of Authorize.aspx:
<%
Dim RSACookieAPI
'//Response.Cookies["RSACookieAPI"].Expires = DateTime.Now.AddYears(-30)
RSACookieAPI = Server.CreateObject("Rsacookieapi.RSACookie")
%>
Hello <%=RSACookieAPI.RSAGetUserName() %>
<%
session("rsauser")=RSACookieAPI.RSAGetUserName()
%>
<%
Response.Redirect("auth.aspx")
%>
My question is that when i click logout in the destination page for each account the RSA cookie's time frame and user's session should expire and come to the home page. I don't know how to end the RSA cookie's session as i have different accounts in each page from which i logout. So pls help me with this issue. i think i have confused u a bit with my question. Sorry for that. pls help me with this issue.
Thanks and Regards
Vijay.
|
|
|
|
|
Dear vijay,
you can set the logout events with cookie.discard and session.abandon methods
then in the page postback check the user has the session and cookie like that. Then you can redirect them to home page
All The Best
Sathesh Pandian
|
|
|
|
|
Hi,
I am creating an application in asp.net 2.0
Now, I would like to call “Google search engine” Page using Web service in my Web Page. How can I do this?
Any
rajesh
|
|
|
|