|
I have found a way to do it now, it may not not be the best way but it works. I send the variables to a ASP page which writes them to a file, the Java applet then redirects to a page which displays the contents of the file.
|
|
|
|
|
Hi,
I have a global.js file that gets included in every page. In it I have a statement that reads as follows:
window.defaultStatus = "blah blah blah";
This works well in Internet Explorer, but it does not display in the status bar in Mozilla. Can anyone tell me why, and how to solve the problem?
Regards,
ma se
|
|
|
|
|
Each browser has a sightly different Document Object Model (DOM). You have to test to find out what browser is being used by the client, and, then, have your code perform according to this information. You need to look at the Mozilla DOM documentation to determine how it is done on that particular browser.
|
|
|
|
|
|
My site contains free softwares developed by me. I want to record how many users have downloaded my each program.
I only want to work in html & jscript (if you give me code of it, i don't know jscript).
Now i plan this approach:
>>First user select my program.
>>On program's detail page there is a link to download this software.
>>When user clicks this link, a new webpage with SiteCounter on it, opens for 5 seconds and automatically starts downloading file. (Like on almost every downloads site, e.g. www.downloads.com).
Please tell me how to build this page. I have the source code of my sitecounter. Rest is what I wanted.
Thanx
|
|
|
|
|
Hi,
Did you use database, if no then why dont you use file concept (create a new txt file add a text 0, and save it in root directory, open a file while download read and increment the count for every download ).
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
I have sitecounter which will do it for me.
But the real problem is that how to make this intermediate page which will start downloading my .exe file after 5 seconds. If you know the answer, please tell me the source code. (If I know jscript, then I'll do it, but I don't know jscript.)
|
|
|
|
|
Hello Forum:
this is a calendar web application that displays all events from a database oracle, depending on the department and date.
data is currently retrived and display propertly in a table as a list. example
Name: event title
date: event date
department: department name
description: description of the event
if more than one event it will display in consecutive order by date.
Name: event title
date: event date
department: department name
description: description of the event
Name: event title
date: event date
department: department name
description: description of the event
Problem:
I have to display these events in a calendar grid, each individual event inside its corresponding box(date) for corresponding month.
Alxtech
|
|
|
|
|
I have added a button on my web page which onClick call javascript "window.print".it will print the page.fine.But i want to print the page in lanscape not in portrait.what should i do.i also tried
@page {set:lanscape}
But the page is not printing in landscape.
Can any body solve my problem??
Thanx
|
|
|
|
|
You have not specified the media for the style. Try this:
@page {set:lanscape}
Don't worry, be happy )
|
|
|
|
|
I also tried this but problem could not solved.
@page {set:lanscape}
|
|
|
|
|
A friend has asked me to help with a business idea to sell files over the internet (like the mp3 download sites). Obviously they could just email the files on payment received but I would like to find a better solution.
I just don't know where to begin, can anyone point me in the right direction?
Should I try to find a application someone has already written which can be adapted?
Any thoughts would be really usefull.
Thanks,
Ali
|
|
|
|
|
Try Share-it.
http://www.shareit.com
|
|
|
|
|
Hello helpfull web guru who will hopefull know what is wrong!
I have a web app, that builds a graph according to survey data entered over several pages. The answers to these questions are saved to an SQL database. After the last question is answered, the page calls the following class:
Imports System.drawing<br />
Imports System.io<br />
<br />
Public Class StarMaker<br />
<br />
Private picbox As New System.Windows.Forms.PictureBox<br />
<br />
Private ax1pt As Point = New Point(181, 193)<br />
Private ax2pt As Point = New Point(181, 193)<br />
Private ax3pt As Point = New Point(181, 193)<br />
Private ax4pt As Point = New Point(181, 193)<br />
Private ax5pt As Point = New Point(181, 193)<br />
Private ax6pt As Point = New Point(181, 193)<br />
Private ax7pt As Point = New Point(181, 193)<br />
<br />
Private ratio1 As Double<br />
Private ratio2 As Double<br />
Private ratio3 As Double<br />
Private ratio4 As Double<br />
Private ratio5 As Double<br />
Private ratio6 As Double<br />
Private ratio7 As Double<br />
<br />
Private p_maxVal As Double<br />
Private p_ax1 As Double<br />
Private p_ax2 As Double<br />
Private p_ax3 As Double<br />
Private p_ax4 As Double<br />
Private p_ax5 As Double<br />
Private p_ax6 As Double<br />
Private p_ax7 As Double<br />
<br />
Private p_FileLoc As String<br />
Private p_FileName As String<br />
<br />
Public Property FileName() As String<br />
Get<br />
FileName = p_FileName & ".jpg"<br />
End Get<br />
Set(ByVal value As String)<br />
p_FileName = value<br />
End Set<br />
End Property<br />
<br />
Private Function colorCreator(ByVal h As String) As Color<br />
If Mid(h, 1, 1) = "#" Then<br />
Dim c As New ColorConverter<br />
colorCreator = c.ConvertFromString(h)<br />
Else<br />
colorCreator = System.Drawing.Color.FromName(h)<br />
End If<br />
End Function<br />
<br />
Public Sub DumpImage()<br />
picbox.BackgroundImage = Drawing.Image.FromFile(System.Configuration.ConfigurationManager.AppSettings("TenantBackgroundImageLoc"))<br />
Dim gfx As Graphics = Graphics.FromImage(picbox.BackgroundImage)<br />
<br />
Dim col As Color = colorCreator("#AB0534")<br />
Dim pen As Pen = New Pen(col, 3)<br />
<br />
gfx.DrawLine(pen, ax1pt, ax2pt)<br />
gfx.DrawLine(pen, ax2pt, ax3pt)<br />
gfx.DrawLine(pen, ax3pt, ax4pt)<br />
gfx.DrawLine(pen, ax4pt, ax5pt)<br />
gfx.DrawLine(pen, ax5pt, ax6pt)<br />
gfx.DrawLine(pen, ax6pt, ax7pt)<br />
gfx.DrawLine(pen, ax7pt, ax1pt)<br />
<br />
gfx.Flush()<br />
<br />
picbox.Image = New Bitmap(400, 400, gfx)<br />
<br />
picbox.Refresh()<br />
<br />
<br />
p_FileName = System.Guid.NewGuid.ToString<br />
<br />
Do Until File.Exists(p_FileLoc & "\" & p_FileName & ".jpg") = False<br />
p_FileName = System.Guid.NewGuid.ToString<br />
Loop<br />
<br />
Dim img As Bitmap = picbox.BackgroundImage<br />
Dim ms As New MemoryStream()<br />
img.Save(ms, Imaging.ImageFormat.Jpeg)<br />
Dim imgData(ms.Length - 1) As Byte<br />
ms.Position = 0<br />
ms.Read(imgData, 0, ms.Length)<br />
Dim fs As New FileStream(p_FileLoc & p_FileName & ".jpg", FileMode.Create, FileAccess.Write)<br />
fs.Write(imgData, 0, UBound(imgData))<br />
<br />
fs.Close()<br />
fs.Dispose()<br />
<br />
ms.Close()<br />
ms.Dispose()<br />
<br />
img.Dispose()<br />
<br />
picbox.Dispose()<br />
<br />
pen.Dispose()<br />
<br />
gfx.Dispose()<br />
End Sub<br />
<br />
Public Sub New(ByVal FileLoc As String, ByVal maxval As Double, ByVal ax1 As Double, ByVal ax2 As Double, ByVal ax3 As Double, ByVal ax4 As Double, ByVal ax5 As Double, ByVal ax6 As Double, ByVal ax7 As Double)<br />
p_FileLoc = FileLoc<br />
p_maxVal = maxval<br />
<br />
p_ax1 = ax1<br />
ratio1 = p_ax1 / p_maxVal<br />
ax1pt.X = 181 + (0 * ratio1)<br />
ax1pt.Y = 193 - (143 * ratio1)<br />
<br />
p_ax2 = ax2<br />
ratio2 = p_ax2 / p_maxVal<br />
ax2pt.X = 181 + (112 * ratio2)<br />
ax2pt.Y = 193 - (89 * ratio2)<br />
<br />
p_ax3 = ax3<br />
ratio3 = p_ax3 / p_maxVal<br />
ax3pt.X = 181 + (139 * ratio3)<br />
ax3pt.Y = 193 + (32 * ratio3)<br />
<br />
p_ax4 = ax4<br />
ratio4 = p_ax4 / p_maxVal<br />
ax4pt.X = 181 + (62 * ratio4)<br />
ax4pt.Y = 193 + (128 * ratio4)<br />
<br />
p_ax5 = ax5<br />
ratio5 = p_ax5 / p_maxVal<br />
ax5pt.X = 181 - (63 * ratio5)<br />
ax5pt.Y = 193 + (128 * ratio5)<br />
<br />
p_ax6 = ax6<br />
ratio6 = p_ax6 / p_maxVal<br />
ax6pt.X = 181 - (140 * ratio6)<br />
ax6pt.Y = 193 + (32 * ratio6)<br />
<br />
p_ax7 = ax7<br />
ratio7 = p_ax7 / p_maxVal<br />
ax7pt.X = 181 - (113 * ratio7)<br />
ax7pt.Y = 193 - (89 * ratio7)<br />
<br />
DumpImage()<br />
End Sub<br />
End Class
Which should draw the image, and save it to the HDD, and return the calling page with a GUID filename.
My problem occurs if two users are doing the test simultaneously. The class keeps drawing the first image over and over, completely ignoring any new parameters passed into the constructor?
Please help me if you know what I am doing wrong? The code below is the calling code on the page:
Private Sub DisplaySpider()<br />
Dim Ws As New IntranetWS.DataReader<br />
<br />
Dim PercArr(7) As Integer<br />
Dim x As Integer<br />
Dim Perc1 As Integer<br />
Dim Perc2 As Integer<br />
Dim Perc3 As Integer<br />
Dim ErStr As String = ""<br />
For x = 1 To 7<br />
Dim PercDs As DataSet = Ws.Pillar_Perc_Read(ConfigurationManager.AppSettings("ApplicationKey"), x, Session("LanguageId"), ErStr) ' Retrieve scores dataset from the database<br />
If Not PercDs Is Nothing Then 'Build up values to pass to graphing class<br />
<br />
Perc1 = PercDs.Tables(0).Rows(0)("AnswerFlag")<br />
Perc2 = PercDs.Tables(0).Rows(1)("AnswerFlag")<br />
Perc3 = PercDs.Tables(0).Rows(2)("AnswerFlag")<br />
PercArr(x) = Perc1 + Perc2 + Perc3<br />
Else<br />
If ErStr = "" Then<br />
ErStr = "Error Saving Data, please try again"<br />
End If<br />
Master.DisplayError(ErStr)<br />
Exit Sub<br />
End If<br />
Next x<br />
<br />
Dim star As New StarMaker.StarMaker(ConfigurationManager.AppSettings("StarFolder"), 15, PercArr(1), PercArr(2), PercArr(3), PercArr(4), PercArr(5), PercArr(6), PercArr(7)) ' create instance of graphing class, passing in parameters for plotting<br />
<br />
Dim filename As String = star.FileName ' get GUID filename<br />
If Not Ws.BrandToolPicture_Save(ConfigurationManager.AppSettings("ApplicationKey"), Session("UserId"), filename, ErStr) Then ' Save filname agains userID in the database<br />
If ErStr = "" Then<br />
ErStr = "Unknown error saving BrandToolPicture."<br />
End If<br />
Master.DisplayError(ErStr)<br />
Exit Sub<br />
End If<br />
Response.Redirect("BrandToolImage.aspx") 'Open Report which displays image & scores<br />
<br />
End Sub
Thanks
Michael - The guy breaking out in a cold sweat.
|
|
|
|
|
All my dear friends
Im a new programmer. I have finished a webbase ASP.Net+C# project. I want to publish it on my LAN(2 windowXP PCs linked togeter with a roster). I can use IE to browse my webbase application pages on the computer that I used to developed the project.(I open IE, input the address "http://localhost/VParking/Main.aspx") It works for the computer.
But how can use IE to browse the project from another computer?
I tried to shared my Inetpub floder. and open the IE from another computer and input address "\\MING\Philip's (C)\Intpub\VParking\Main.aspx". but it doesnt work in this way.
Would anybody give me hit to solve my problem?
Thank you very much
|
|
|
|
|
Try http://MING/VParking/Main.aspx and, if it can't resolve that hostname, then try http://<IP Address of MING>/VParking/Main.aspx .
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hello,
I am trying to build a webpage which allows my users to search multiple seach engines asynchronously. The page will contain 1 input textbox and a submit button. I want the search engines to be in variable format so I can pull from database or datatable. After a user enters a search value into the texbox, I want a spinning search indicator for each instance of the search engine source to show to the user. Once one of the search engine source returns a result I want to update the loading indicator to a different image and also show the results on a datagrid below the progress indicators. I was able to get one instance to work with the indicator and results but I can't seem to get it to work for multiple progress indicators and results. Thank you if you can help.
slam
|
|
|
|
|
sammyl33 wrote: I was able to get one instance to work with the indicator and results but I can't seem to get it to work for multiple progress indicators and results.
Well, you're probably doing something wrong.
...
...
Since you don't describe at all how you're trying to accomplish this task, it's very unlikely anyone here will be able to help you.
|
|
|
|
|
Well, I am trying to do this in C# under .NET Framework 1.1 and on a webform.
Here is what I would like to accomplish...
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="portal.WebForm1" %>
<title>WebForm1
texbox...
button...
datagrid1...
datagrid2...
Here are my questions....
Lets say I have 3 sources (www.google.com, www.yahoo.com, and www.msn.com), they will show up on datagrid1 when the page load like this...
Source Status
www.google.com None
www.yahoo.com None
www.msn.com None
As soon as the user enters a value and click Search, this is how datagrid1 should look
Source Status
www.google.com Searching...
www.yahoo.com Searching...
www.msn.com Searching...
And as soon as one of the Sources return any results or error it will update the Status for that Source accordingly. It will also populate the results in datagrid2 like this...
datagrid1:
Source Status
www.google.com Success
www.yahoo.com Error
www.msn.com Searching...
datagrid2:
Source No. Results
www.google.com 100
www.yahoo.com 0
I hope this makes sense. I search all over but can't seem to find a way to do this. Any help is greatly appreciated.
slam
|
|
|
|
|
IE on Windows XP SP2 shows this yellow bar on the top of the webpage if it has an activex control. I want to show a message on the webpage to the end user to click on the yellow bar and install AX control, but I would like to show the message only if the client OS is Windows XP SP2. Is there a way to detect this from either the http headers, or user agent string, or from the javascript in the web page? I looked at the user agent string, but I dont see anything that tells you it is from Windows XP SP2.
thanks!
|
|
|
|
|
I think you must use JScript, and if you do, the yellow bar will show up because you are trying to access sysinfo. I think you should view the message anyway, as most xp users have sp2.
----
Dim Sleepy as Boolean = True
If Me.Sleepy = True Then
Goto Sleep
End If
----
|
|
|
|
|
After a few evenings of doing tutorials and trying things out, I just encountered my first reallife .NET problem. It concerns dynamic databinding of a Repeater control, using C# and Visual Studio 2005.
For the purpose of binding a number of XML datasources (RSS feeds) to multiple Repeater controls, I made my own implementation of the ITemplate interface :
<br />
public class RssTemplate : ITemplate<br />
{<br />
static int itemcount = 0;<br />
ListItemType templateType;<br />
string title;<br />
<br />
public RssTemplate(ListItemType type)<br />
{<br />
templateType = type;<br />
}<br />
<br />
public RssTemplate(ListItemType type, string t)<br />
{<br />
templateType = type;<br />
title = t;<br />
}<br />
<br />
private void TemplateControl_DataBinding(object sender, System.EventArgs e)<br />
{<br />
Literal lc;<br />
lc = (Literal)sender;<br />
RepeaterItem container = (RepeaterItem)lc.NamingContainer;<br />
lc.Text = "<a href=\""; <br />
lc.Text += XPathBinder.Eval(container.DataItem, "link").ToString();<br />
lc.Text += "\">";<br />
lc.Text += XPathBinder.Eval(container.DataItem, "title").ToString();<br />
lc.Text += "</a><br />";<br />
}<br />
<br />
public void InstantiateIn(System.Web.UI.Control container)<br />
{<br />
Literal lc = new Literal();<br />
switch (templateType)<br />
{<br />
case ListItemType.Header:<br />
lc.Text = "<b>" + title + "</b><br>";<br />
break;<br />
case ListItemType.Item:<br />
lc.DataBinding += new EventHandler(TemplateControl_DataBinding);<br />
break;<br />
case ListItemType.Footer:<br />
lc.Text = "<br />";<br />
break;<br />
}<br />
container.Controls.Add(lc);<br />
itemcount += 1;<br />
}<br />
}<br />
Now I want to loop through a collection of XML urls, fetch the content and bind each dataset to a different Repeater control (see code below). The problem is that the Databind() function, which should bind all datasources to their corresponding controls, binds every control to the first Datasource. I end up having multiple copies of the same RSS items on my page.
I'm sure it's something very trivial I'm overlooking here or it might be that my approach is wrong altogether, but if someone could push me in the right direction here, I would be very grateful.
<br />
OleDbDataReader dtr = cmd.ExecuteReader();<br />
WebFetch wf = new WebFetch();<br />
while (dtr.Read())<br />
{<br />
XmlDataSource xmlds = new XmlDataSource();<br />
xmlds.Data = wf.fetchURL(dtr.GetString(2));<br />
xmlds.XPath = "rss/channel/item";<br />
<br />
Repeater rss_repeater = new Repeater();<br />
rss_repeater.DataSource = xmlds;<br />
rss_repeater.HeaderTemplate = new RssTemplate(ListItemType.Header, dtr.GetString(1));<br />
rss_repeater.FooterTemplate = new RssTemplate(ListItemType.Footer);<br />
rss_repeater.ItemTemplate = new RssTemplate(ListItemType.Item);<br />
RssPlaceHolder.Controls.Add(rss_repeater);<br />
}<br />
dtr.Close();<br />
DataBind();<br />
As stated above : why does DataBind() bind all instances of the Repeater class to the same instance of XMLDataSource, where it should bind (in my opinion) to different instances of XMLDataSource?
-- modified at 4:32 Wednesday 15th February, 2006
|
|
|
|
|
Well, I fixed my own problem by accident, but I can say I was quite surprised by the solution. Not to say that this DataSource class seems to me, coming from a C++ background, rather strangely implemented.
The solution for my problem was : initialize the ID property of the datasource instance and it will be a different instance! I now have different repeater controls bound to different datasources, instead of having them all bound to the single first datasource that I created. So doing
DataSource ds = new DataSource()
doesnt create an instance (yet) with its own address space, but
ds.ID = "some_unique_name";
does!
Anyone else thinks this is rather odd? I mean, just imagine you were me, having worked with OO oriented languages for more than 10 years and coming across this seemingly new approach to class instantiation.
|
|
|
|
|
ASP.NET uses the ID of a control to keep track of it during each postback. The control's ID is used to identify the control's serialized information. Without the ID, ASP.NET won't be able to reconstruct the control on the server side.
|
|
|
|
|
dear friends
I have simple page for enquirey form which contains the code as below
<%
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function
dim First_Name,Last_Name,Title,Company,Address1,CmbCountry,ZipCode,cmbEtype,EmailId,Comments,entdate
dim sql_insert
FirstName=ChkString(Request.form("First_Name"))
LastName=ChkString(Request.form("LastName"))
Title=ChkString(Request.form("Title"))
Company=ChkString(Request.form("Company"))
Address1=ChkString(Request.form("Address1"))
CmbCountry=ChkString(Request.form("CmbCountry"))
ZipCode=ChkString(Request.form("ZipCode"))
EmailId=ChkString(Request.form("EmailId"))
cmbEtype=ChkString(Request.form("cmbEtype"))
Comments=ChkString(Request.form("Comments"))
entdate=now()
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open("c:/inetpub/wwwroot/altadawi/Database/AlTadawi.mdb")
set rs = Server.CreateObject("ADODB.recordset")
rs.cursorlocation =3
sql_insert = "insert into EnqDetail (Fname, Lname, Etitle, Ecompany,Address1,Country,ZipCode,EType,emailId,EnqDet,EntryDate) values ('"
sql_insert=sql_insert & FirstName & "', '" & LastName & "', '" & Title & "', '" & Company & "', '" & Address1 & "', '" & CmbCountry & "', '" & ZipCode & "', '" & cmbEtype & "', '" & EmailId & "', '" & Comments & "','" & entdate & "')"
response.write(sql_insert)
rs.Open sql_insert, conn,1,2
rs.close
Set RS = Nothing
conn.close
%>
when I submit this page it gives me error as below
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/altadawi/EnqSubmit.asp, line 38
Please can u tell me where is the problem in my code.
Your quick response will be highly appreciated.
Thankx
Murtuza Patel
|
|
|
|
|