|
I'm trying to get an image from an Access database (which is stored as an OLE Object type) to appear, on the fly, when the page is built using ASP.
My ASP page looks like this:
<%<br />
var sProductId = Request("productId");<br />
if (sProductId == null || sProductId == "")<br />
{<br />
Response.End();<br />
}<br />
<br />
var rsImage = getRsUsingParams("procProductImages", sProductId);<br />
if (!rsImage.EOF)<br />
{<br />
Response.ContentType = "image/jpeg";<br />
Response.BinaryWrite(rsImage("fullsizeImage").Value);<br />
}<br />
else<br />
{<br />
Response.End();<br />
}<br />
<br />
rsImage.Close();<br />
rsImage = null;<br />
%>
But what I get back is an empty image placeholder - no picture. Has any one any ideas about what is happening? All the necessary include files are included and when I try this function in isolation I don't get any errors.
HELP!!
stevus
e: stevusuk@yahoo.com
-- modified at 5:19 Wednesday 31st August, 2005
|
|
|
|
|
Hi is it possible to disable all the scripts inside a frame at runtime
i mean by using some form of javascript.
i have page1 which will disable all the tags when it load another page inside the IFrame.
One way is to put it the comments block around the block u want to disable
but i don't want this, i want do disable and then enable scripts in a Iframe at runtime
Thanks In Advance
|
|
|
|
|
hi there,
First, I'm sorry if I misunderstood ur mean. because javascript code can be dynamically generated at runtime, so u can do whatever u want in this case.
I mean u can enable/disable js by coding.
Thats what I think
<< >>
|
|
|
|
|
No, you can't disable scripts using script.
And even if you could, it would not be possible to enable scripts once the page is loaded, as some scripts only work while the page is loading.
---
b { font-weight: normal; }
|
|
|
|
|
I am not JS guru but what about global variable? Something like ( <script>... if(JSDisabled)return; ... </script> If there is not such a thing as global variable then hidden field/getElementById allways work
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Yes, of course you can make the code disable itself. But I don't believe that this was the question.
---
b { font-weight: normal; }
|
|
|
|
|
So you mean original question was to disable ALL javascript in IFrame with alien content ( same way as you would do in browser settings? Uh, I didn't think that...
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
|
HI,
Iam looking for an application very similar to "Microsoft Application center", but also should be able to perform some tasks like send emails, send sms text messages about the test results.
Any info on this will be great.
Regards,
Saleem.
|
|
|
|
|
Hi, I have the following problem. I have a listbox on my page which displays the list of Company names in the Customers table of Northwind. I have created this listbox and use Javascript to fill it. My problem is that some of the company names contain " ' " which of course causes a problem, as the script thinks its the end of the text. Is there any character I can insert which Javascript would interpret as being ' and not the end of the string?
|
|
|
|
|
You can escape ' characters with \'. The other option is to enclose your string with " instead of ' since javascript accepts both styles.
'can't' <- invalid
"can't" <- valid
'can\'t' <- valid
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Hi Andy, thanks for your quick reply. I would have used ", only I am generating the javascript through code, which is why I was stuck using ' - I suppose I should have mentioned that. But thanks for your help, it works well.
|
|
|
|
|
The \' escape is really the best solution since that will work no matter what. The other suggestions were just extra goodness.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I have a commercial web application. I face a situation that i want my client using my web application just can create a limited number of account. The problem is: my client can easily change that number by modify the source of php page. How can i avoid that ?
Thanks in advance
Note: Sorry if my English is too bad!
|
|
|
|
|
The same thing can be done for any application including C and C++ applications. That's why obscufator programs exist. I'm sure the temptation for customers to make changes is worse with a script application like ASP or PHP, but either way it should be a violation of the application licensing terms.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Thanks your reply!
Yes, with script application, you can't hide anything on your source code; and i can't find anyway can help about it. With windows application, you can package it to be dll files.
Thanks again!
|
|
|
|
|
Blue_Skye wrote:
With windows application, you can package it to be dll files
...as you can with asp.net...
|
|
|
|
|
Yes, but dll files can be decompiled and you can find the value and modify it in the binary. I used to do it to change the colors displayed in a simple enhanced directory list conosle application all the time. The only thing that really prevents customers from making the changes is your license agreement with them. If you are really concerned about it then bury some code in the applicatin that uploads the setting to your servers periodically and then verify it with what they purchased.
It is probably better to make it easy to add licenses then chase after people that cheat on the upgrade. At least you got some money out of them.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
How do you display video output from a TV card on a web page?
Any suggestions would be most appreciated!
Mattias
|
|
|
|
|
Where is the TV card, on the server or the client ? If the client, what's the use of it ? If the server, then your main problem is streaming video. I'd suggest that once you work out how to stream video, getting it from the card should be trivial.
Most web sites that have a web cam just set a page to refresh itself, and probably just write a new image to the same file in a similar interval.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian,
Thanks for your reply!
The TV card will be on the server. Any pointers to how I get started with streaming video? For instance, are there any classes in the .NET Framwork that could be of use?
Mattias
|
|
|
|
|
There are no classes in .NET that I know of. Here[^] is one of the hundreds of links I got using google.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi
How can i add webusercontrol in project class library
-- modified at 15:50 Tuesday 30th August, 2005
|
|
|
|
|
You want to use a web user control in a windows project ? You can't.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Christian
I want add web usercontrol in calss libaray
|
|
|
|