|
Does anybody know any good opensource php/mysql blog or forum to share pdf and audio contents?
|
|
|
|
|
I was just about finishing creating my own custom web/server-side combobox component, when I noticed that the component was acting strangely in absolute positioning mode. I could position it in the VS.Net 2003 Designer, but further left I positioned the component, the wider it got.
Looking at html view in the designer I can see that the positioning information is written to the inline style string of my custom component, but from within the class code, if I try to read it from MyBase, I don't see this information.
I originally tried to shadow the Style property, but for some reason Microsoft set it up so you could only read the property. Writing to it caused an error saying that you can only update the Style at runtime. To get around this I created my own ComponentStyle property, which allowed me to read and write the style information to a span webcontrol object. In this property, I can get or set the span's Style property. This appeared to work until I noticed the problem I spoke about above. Which is caused because VS.NET Designer creates its own style in my custom componet.
I wouldn't mind using that one except that it displays System.Web.UI.CssStyleCollection in the Designer property window for Style, and the user can't do anything with it. Also I found using my own ComponentStyle property that I need to standardize the user settings when they are added or removed from the style collection or else there can be a WIDTH, a Width, and a width, as the collection isn't smart enough to know that they are all the same.
I tried creating a Setter for a shadowed version of the Style so I could update my ComponentStyle property when the Designer updates the Style property, but then my component doesn't render in the designer.
How do I get the Designer to use my ComponentStyle property or "catch" the changes in the Style that the Designer creates?
|
|
|
|
|
Using Me.Behavior.GetStyleAttribute( Key ), where Key is one of the Style attributes such as Position, Left, Top, etc., seems to get the modified Style information. Behavior in this case gets the DHTML properties.
So now that I can get this information and send them back to the appropriate property in my component, I need to prevent the Designer from writing out the style string.
How can I do this?
If I let the designer write the style string out to my component's HTML, then it acts as if it is nested inside of another absolute positioned container, throwing the design time position way off! Also, it's confusing to the people using my component to have a ComponentStyle and a Style.
FYI: the reason I'm using a ComponentStyle rather than just style is that you can't create a fully read/write override/shadow property for Style, as style is read only, and will give you an error saying that you may only update it at runtime.
Darn, Microsoft thought of Everything!
|
|
|
|
|
I am issuing an asynchronous XMLHttpRequest that is working in IE and Opera browsers but does not function properly in the Firefox browser.
I have evidence that the XMLHttpRequest is going to the server in Firefox (by observing the results of a different script issuing the same type of request) but the Request.responseText is not being returned consistently with what is working in IE and Opera.
I put together a demonstration of the XMLHttpRequest that will illustrate the problem I am having here: Link to example of problem
vardump.php is a simple script that just returns the $_POST or $_GET variables passed to it that I use for troubleshooting.
It works properly when executed in IE or Opera but not in Firefox.
Does anyone know of a reason why this is happening?
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Hi,
Crystal server 11 (release 1)
Database: Oracle 10.2
ASP.NET 2.0
Can somebody help me to schedule a report which is using a stored procedure from oracle using ASP.NET?
below is the current code which is giving me error database connector error.
--------------------------------------
if(ceReportObjects.Count > 0)
{
ceReportObject = ceReportObjects[1];
ceReport = (Report)ceReportObject;
//grab the report logons
dbLogons = ceReport.ReportLogons;
dbLogon = dbLogons[1];
dbLogon.UseOriginalDataSource = false;
dbLogon.CustomDatabaseDLLName = "crdb_oracle.dll";
dbLogon.CustomServerName = "MyServer";
dbLogon.CustomUserName = "crystal";
dbLogon.CustomPassword = "reports";
ceSchedulingInfo = ceReport.SchedulingInfo;
//run the report right now
ceSchedulingInfo.RightNow = true;
//run the report once only
ceSchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce;
//schedule report
ceInfoStore.Schedule(ceReportObjects);
}
------------------------------------------
Thanks in Advance
Mohammed
|
|
|
|
|
Hi
I am making a shopping cart for my web site. But I have problems deleting items from the cart. When i try to delete a item, only the carttable item gets deleted and the all items from cartID gets deleted and it will be converted from an array to a variable with the value of cartid from the url.
Here is the entire code i have written up till now.
___________My shopping cart_____________
<?php
$pat = "_^[\d]*\$_";// nothing else but decimals here
/*Chcking if every thing is filled out*/
//inserting product
if (isset($_GET['cartfunc']) && $_GET['cartfunc'] == 1 &&
isset($_GET['cartID']) &&
isset($_GET['carttable']) && preg_match($pat, $_GET['cartID']) &&
preg_match($pat, $cartfunc) &&
$_GET['carttable'] == 'Dansk' $_GET['carttable'] == 'Engelsk'
$_GET['carttable'] == 'Svensk')
{
$_SESSION['cartID'][] = $_GET['cartID'];
$_SESSION['carttable'][] = $_GET['carttable'];
// using print__r to see the contens of array
print_r($_SESSION['cartID']);
print_r($_SESSION['carttable']);
// Calculating amount and price of products
$i = 0;
$price = 0;
$total = 0;
foreach ($_SESSION['cartID'] as $productID)
{
$session = $_SESSION['carttable'][$i];
$result = mysql_query("SELECT Price FROM $session WHERE ID
= $productID");
if (!$result)
{
echo 'Could not execute request. Problem is: ' .
mysql_error();
exit;
}
while($row = mysql_fetch_assoc($result))
{
$total = $total + 1;
$price = $price + $row['Price'];
} // while
$i++;
} // foreach
$_SESSION['vognprice'] = $price;
$_SESSION['total'] = $total;
} // if
//Deleting 1 product
else if (isset($_GET['cartfunc']) && $_GET['cartfunc'] == 2 &&
isset($_GET['cartID']) &&
isset($_GET['carttable']) && preg_match($pat, $_GET['cartID']) &&
preg_match($pat, $cartfunc) &&
preg_match($pat, $_GET['cartarraynum']) && $_GET['carttable'] ==
'Dansk' $_GET['carttable'] == 'Engelsk' $_GET['carttable'] ==
'Svensk')
{
$num = $_GET['cartarraynum'];
intval($num);
$lang = $_SESSION['carttable'][$num];
$cartID = $_GET['cartID'];
$result = mysql_query("SELECT Price FROM $lang WHERE ID =
$cartID");
if (!$result)
{
echo 'Could not execute request. Problem is:
'.mysql_error();
exit;
}
while($row = mysql_fetch_assoc($result))
{
$_SESSION['total'] = $_SESSION['total'] - 1;
$_SESSION['vognprice'] = $_SESSION['vognprice'] -
$row['Price'];
}
unset($_SESSION['carttable'][$num]);
unset($_SESSION['cartID'][$num]);
print_r($_SESSION['cartID']);
print_r($_SESSION['carttable']);
}
else
{
echo 'You forgot to set some values.';
}
?>
On before hand
Thank you for your help
-- modified at 7:22 Monday 11th December, 2006
|
|
|
|
|
How Threads Work in ASP ? PLZ tell someone about the Threads or someone send me a little code of Threads application that helps me to know about Threads in ASP.
I am working on a Forum web site and i need to create a page for the new questions raised by the users .
................ Help me ............
ALSO Tell me ABOUT LAYERS .....
|
|
|
|
|
adnanmalik wrote: How Threads Work in ASP ?
Threading is used by the web server to process requests. Each page is run as a separate thread, so that the server can process multiple requests in parallel.
adnanmalik wrote: I am working on a Forum web site and i need to create a page for the new questions raised by the users .
I don't see how that has anything to do with threading?
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: I don't see how that has anything to do with threading?
I'm getting the feeling he is talking about a forum thread.
Brad
Australian
I assume Microsoft would not use doors, because using Windows is faster.
|
|
|
|
|
Hi all
I need to know whether I can change the printing options from JavaScript.
For example when I call Window.Print() , can I give specify that I want it to be printed as landscape or to fit the page to printer margins..
Thanks a lot in advance
Happy
|
|
|
|
|
You can't do it through javascript, but you have a mild level of configurability with CSS. Google printing with CSS.
Brad
Australian
I assume Microsoft would not use doors, because using Windows is faster.
|
|
|
|
|
Thanks a lot Brad
So how can I set the size & orientation options in the CSS??
Happy
|
|
|
|
|
happyheartcs wrote: size & orientation
Do you mean of the text? if so then just use normal css.
Brad
Australian
I assume Microsoft would not use doors, because using Windows is faster.
|
|
|
|
|
I have a program that calls a web service to retrieve data. Everything seems to work great, except with one group of users. We are pretty sure this is the result of a network setting or something, since we can run the program and successfully use the web service from inside and outside our own network with other test cases. Does anyone know of a setting or program or firewall option or anything that would stop a web service from working?
|
|
|
|
|
Check their proxy settings. It is possible that they can't get through because the proxy server either doesn't recognise them or their settings are invalid.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I ended up creating a test program that would try to access the web service and if it failed would output a detailed error message, and it looks like you were right. The error was:
The remote server returned an error: (407) Proxy Authentication Required.
So they are working to fix their proxy settings. Thank you for your input.
|
|
|
|
|
I've built a custom web/server-side component ComboBox. However, when I tried to explicitly
handle property assignments to the Style I get a message saying that that property may only
be set at runtime.
In my component I actually have three webcontrols: a image-button, a listbox, and a textbox,
which in my code, I use as storage for the various properties that my component supports,
including the Style properties for each of these controls using distinctive properties for
each one: ImageStyle, ListBoxStyle, and TextBoxStyle. And this works for them. Then, as I
said at the top of this message, I wanted to create an explicit property for the base
class's Style property, and got the error, so I created a new one called ComponentStyle,
and changed the Style in my component's tag from Style to ComponentStyle, but nothing shows
in the ComponentStyle property in the Designer's Property Window. Strangely, the inline
style values are getting rendered in the web-page, so they are being loaded, just not
showing in the designer.
Here is the code I'm using for my Style and ComponentStyle properties:
' --------------- Property Style --------------------------------
' Setting Browsable to False to hide this property from the Designer Property window.
' This property uses Shadow to allow me declare the Browsable directive.
<browsable(false), category("component"),="" defaultvalue(""),="" _
="" description("component="" level="" inline="" css="" string")=""> _
Public Shadows ReadOnly Property [Style]() As System.Web.UI.CssStyleCollection
Get
Return MyBase.Style
End Get
End Property ' Style
' ----------- Property ComponentStyle --------------------------
' This is the public version of the above property.
'
' The Getter uses the CssStyleCollectionAsString
' function to build a string containing the
' MyBase Style settings.
' ' The Setter uses the
' ApplyCssStyleStringToCssStyleCollection function
' to set the MyBase Style setting from a string.
'
' I know that these helper functions work, I use
' them on through out my program on the other
' components, including CssStyleCollectionAsString
' in the designer to render the component's styles
' for the editor.
'
<browsable(true), category("component"),="" defaultvalue(""),="" _
="" description("component="" level="" inline="" css="" string")=""> _
Public Property [ComponentStyle]() As String
Get
Return CssStyleCollectionAsString(MyBase.Style)
End Get
Set(ByVal Value As String)
ApplyCssStyleStringToCssStyleCollection(Value, MyBase.Style)
End Set
End Property ' ComponentStyle
'
' CssStyleCollectionAsString
'
' Convert a CssStyleCollection to a CSS Style Inline String.
'
' This method is also used by the designer,
' so it must be public.
'
Public Function CssStyleCollectionAsString( _
ByRef SrcCssStyleCollection As System.Web.UI.CssStyleCollection) As String
Dim SrcCssStyleCollectionCounter As Integer = SrcCssStyleCollection.Count
Dim KeyName As String
Dim KeyValue As String
Dim DestCssStyleString As String
If SrcCssStyleCollectionCounter > 0 Then
Dim Keys(SrcCssStyleCollectionCounter - 1) As String
'
' Copy the keys to a new array.
' Can't iterate on the Keys collection directly
' when the values are being changed. The code
' that makes all style names lower case isn't
' shown here, to reduce the code in this listing.
'
SrcCssStyleCollectionCounter = 0
For Each KeyName In SrcCssStyleCollection.Keys
If KeyName <> "" Then
Keys(SrcCssStyleCollectionCounter) = KeyName
SrcCssStyleCollectionCounter += 1
End If
Next
For Each KeyName In Keys
KeyValue = SrcCssStyleCollection( KeyName )
If Not KeyValue Is Nothing Then
DestCssStyleString &= KeyName & ": " & KeyValue
SrcCssStyleCollectionCounter -= 1
If SrcCssStyleCollectionCounter > 0 Then
DestCssStyleString &= "; "
End If
End If
Next
End If
Return DestCssStyleString
End Function ' End of CssStyleCollectionAsString
'
' ApplyCssStyleCollectionToCssStyleCollection
'
' Apply the CSS Style settings in one CssStyleCollection to another.
'
Public Sub ApplyCssStyleCollectionToCssStyleCollection( _
ByRef SrcCssStyleCollection As System.Web.UI.CssStyleCollection, _
ByRef DestCssStyleCollection As System.Web.UI.CssStyleCollection, _
Optional ByVal Mode As String = "REPLACE")
Dim KeyName As String
Dim KeyValue As String
Dim OldKeyValue As String
If Mode.ToUpper <> "REPLACE" Or Mode.ToUpper <> "ADD" Then
MessageBox.MessageBox("Invalid Mode, it must either be Replace or Add.",, _
"ApplyCssStyleCollectionToCssStyleCollection")
ElseIf SrcCssStyleCollection Is Nothing Then
MessageBox.MessageBox("Source CSS Style misssing",, _
"ApplyCssStyleCollectionToCssStyleCollection")
ElseIf DestCssStyleCollection Is Nothing Then
MessageBox.MessageBox("Destination CSS Style misssing",, _
"ApplyCssStyleCollectionToCssStyleCollection")
Else
If SrcCssStyleCollection.Count > 0 Then
Dim Keys(SrcCssStyleCollection.Count - 1) As String
Dim KeyCounter As Integer = 0
For Each KeyName In SrcCssStyleCollection.Keys
If KeyName <> "" Then
Keys(KeyCounter) = KeyName
KeyCounter += 1
End If
Next
If Mode.ToUpper = "REPLACE"
DestCssStyleCollection.Clear()
End If
For Each KeyName In Keys
KeyValue = SrcCssStyleCollection.Item( KeyName )
' if the key doesn't already exist, add it.
If DstCssStyleCollection(KeyName) Is Nothing Then
DestCssStyleCollection.Add(KeyName, KeyValue)
Else
DestCssStyleCollection.Item(KeyName) = KeyValue
End If
Next
End If
End If
End Sub ' End of ApplyCssStyleCollectionToCssStyleCollection
I'm using these helper functions because there aren't built in methods to convert a Style
collection to a string, via versa, and copy Style Collections to each other. Also, for some
reason you can't use the webcontrol's ApplyStyle method to copy the webcontrol's Style
setting to the MyBase.Style, which is the inherited System.Web.UI.WebControls.ListBox.
Thanks
|
|
|
|
|
I've built a custom web/server-side component ComboBox. However, when I tried to explicitly
handle property assignments to the Style I get a message saying that that property may only
be set at runtime.
In my component I actually have three webcontrols: a image-button, a listbox, and a textbox,
which in my code, I use as storage for the various properties that my component supports,
including the Style properties for each of these controls using distinctive properties for
each one: ImageStyle, ListBoxStyle, and TextBoxStyle. And this works for them. Then, as I
said at the top of this message, I wanted to create an explicit property for the base
class's Style property, and got the error, so I created a new one called ComponentStyle,
and changed the Style in my component's tag from Style to ComponentStyle, but nothing shows
in the ComponentStyle property in the Designer's Property Window. Strangely, the inline
style values are getting rendered in the web-page, so they are being loaded, just not
showing in the designer.
Here is the code I'm using for my Style and ComponentStyle properties:
' --------------- Property Style --------------------------------
' Setting Browsable to False to hide this property from the Designer Property window.
' This property uses Shadow to allow me declare the Browsable directive.
<Browsable(False), Category("Component"), DefaultValue(""), _
Description("Component level inline CSS string")> _
Public Shadows ReadOnly Property [Style]() As System.Web.UI.CssStyleCollection
Get
Return MyBase.Style
End Get
End Property ' Style
' ----------- Property ComponentStyle --------------------------
' This is the public version of the above property.
'
' The Getter uses the CssStyleCollectionAsString
' function to build a string containing the
' MyBase Style settings.
'
' The Setter uses the
' ApplyCssStyleStringToCssStyleCollection function
' to set the MyBase Style setting from a string.
'
' I know that these helper functions work, I use
' them on through out my program on the other
' components, including CssStyleCollectionAsString
' in the designer to render the component's styles
' for the editor.
'
<Browsable(True), Category("Component"), DefaultValue(""), _
Description("Component level inline CSS string")> _
Public Property [ComponentStyle]() As String
Get
Return CssStyleCollectionAsString(MyBase.Style)
End Get
Set(ByVal Value As String)
ApplyCssStyleStringToCssStyleCollection(Value, MyBase.Style)
End Set
End Property ' ComponentStyle
'
' CssStyleCollectionAsString
'
' Convert a CssStyleCollection to a CSS Style Inline String.
'
' This method is also used by the designer,
' so it must be public.
'
Public Function CssStyleCollectionAsString( _
ByRef SrcCssStyleCollection As System.Web.UI.CssStyleCollection) As String
Dim SrcCssStyleCollectionCounter As Integer = SrcCssStyleCollection.Count
Dim KeyName As String
Dim KeyValue As String
Dim DestCssStyleString As String
If SrcCssStyleCollectionCounter > 0 Then
Dim Keys(SrcCssStyleCollectionCounter - 1) As String
'
' Copy the keys to a new array.
' Can't iterate on the Keys collection directly
' when the values are being changed. The code
' that makes all style names lower case isn't
' shown here, to reduce the code in this listing.
'
SrcCssStyleCollectionCounter = 0
For Each KeyName In SrcCssStyleCollection.Keys
If KeyName <> "" Then
Keys(SrcCssStyleCollectionCounter) = KeyName
SrcCssStyleCollectionCounter += 1
End If
Next
For Each KeyName In Keys
KeyValue = SrcCssStyleCollection( KeyName )
If Not KeyValue Is Nothing Then
DestCssStyleString &= KeyName & ": " & KeyValue
SrcCssStyleCollectionCounter -= 1
If SrcCssStyleCollectionCounter > 0 Then
DestCssStyleString &= "; "
End If
End If
Next
End If
Return DestCssStyleString
End Function ' End of CssStyleCollectionAsString
'
' ApplyCssStyleCollectionToCssStyleCollection
'
' Apply the CSS Style settings in one CssStyleCollection to another.
'
Public Sub ApplyCssStyleCollectionToCssStyleCollection( _
ByRef SrcCssStyleCollection As System.Web.UI.CssStyleCollection, _
ByRef DestCssStyleCollection As System.Web.UI.CssStyleCollection, _
Optional ByVal Mode As String = "REPLACE")
Dim KeyName As String
Dim KeyValue As String
Dim OldKeyValue As String
If Mode.ToUpper <> "REPLACE" Or Mode.ToUpper <> "ADD" Then
MessageBox.MessageBox("Invalid Mode, it must either be Replace or Add.",, _
"ApplyCssStyleCollectionToCssStyleCollection")
ElseIf SrcCssStyleCollection Is Nothing Then
MessageBox.MessageBox("Source CSS Style misssing",, _
"ApplyCssStyleCollectionToCssStyleCollection")
ElseIf DestCssStyleCollection Is Nothing Then
MessageBox.MessageBox("Destination CSS Style misssing",, _
"ApplyCssStyleCollectionToCssStyleCollection")
Else
If SrcCssStyleCollection.Count > 0 Then
Dim Keys(SrcCssStyleCollection.Count - 1) As String
Dim KeyCounter As Integer = 0
For Each KeyName In SrcCssStyleCollection.Keys
If KeyName <> "" Then
Keys(KeyCounter) = KeyName
KeyCounter += 1
End If
Next
If Mode.ToUpper = "REPLACE"
DestCssStyleCollection.Clear()
End If
For Each KeyName In Keys
KeyValue = SrcCssStyleCollection.Item( KeyName )
' if the key doesn't already exist, add it.
If DstCssStyleCollection(KeyName) Is Nothing Then
DestCssStyleCollection.Add(KeyName, KeyValue)
Else
DestCssStyleCollection.Item(KeyName) = KeyValue
End If
Next
End If
End If
End Sub ' End of ApplyCssStyleCollectionToCssStyleCollection
I'm using these helper functions because there aren't built in methods to convert a Style
collection to a string, via versa, and copy Style Collections to each other. Also, for some
reason you can't use the webcontrol's ApplyStyle method to copy the webcontrol's Style
setting to the MyBase.Style, which is the inherited System.Web.UI.WebControls.ListBox.
Thanks
|
|
|
|
|
A little cheeky I know, but my Momma always said "If you don't ask, you don't get".
I am going to develop a small utility which will read the files contained in the 'favourites' folder and add them to a local html page. The page will then be set as the 'home page' in a browser.
I basicaly want to have quick link menu there when I open my explorer and I'm sure a few other surfers may enjoy the benefit. But, my HTML skills are non-existent. So I would like to ask if anybody is willing to make a template file for me. As payment, I will allow the creator to include a permanent banner/link/whatever to their own page
Cheers and Beers
|
|
|
|
|
Yea sure I will help you out with a basic page template.
Send me an email at:
brad -@- trueguava.com
With a sketch of what you want.
(Please ignore Trueguava.com, it is still in development, I just made a mock home page until I get some time to finish it)
Also with the banner would you mind making it dynamic? As in I can update it depending on what I want people to go to (Don't worry I wont advertise for 3rd party stuff).
Brad
Australian
I assume Microsoft would not use doors, because using Windows is faster.
|
|
|
|
|
Thanks for the offer. I will draw up a rough template of what I am looking for, but keep in mind that I am well open to suggestions. Give me a dialog box and I will make it ergonomic, give me a webpage, I'll make a mess.
Regarding the banner, you can have it however you want. Though if it will be dynamic, it would probably have to be loaded from a third party site. But, considering this sort of banner would be uncensored in a manner of speaking, I would like to give the user the option to either disable it ( from a hard to find option ) or have it loaded from a trusted source ( ie a hard copy with the utility ).
Also, from the utilities options interface, I would like the user to be able to configure thing like "open in existing page", "open in new page" and "open in new tab" ( IE7, FF and Opera come to mind ). These options would need to be coded into the HTML ( javascript? ). I also require the page to be dispalyed correctly in all popular browsers at differing resolutions ( without scrollbars or large empty spaces ).
I will send you an email with more details about what I am looking for, and give you a better idea of how I intend to go about this.
|
|
|
|
|
WalderMort wrote:
Regarding the banner, you can have it however you want. Though if it will be dynamic, it would probably have to be loaded from a third party site. But, considering this sort of banner would be uncensored in a manner of speaking, I would like to give the user the option to either disable it ( from a hard to find option ) or have it loaded from a trusted source ( ie a hard copy with the utility ).
I will stick the banner on a personal server. Crackers would have to get past many Ciscos to change it.
WalderMort wrote: "open in new tab"
This may course some trouble, I'll see what I can find.
WalderMort wrote: javascript?
If you make it a requirement for the user to have JS enabled then I can do much better work.
Brad
Australian
I assume Microsoft would not use doors, because using Windows is faster.
|
|
|
|
|
Hi!
I have a question, if i programming with html and vbscript, these programs called "hta files" must pay licences??.
I will like what somebody tell me an free alternative to this problem, thanks.
Cuando salga el sol, no estare aqui...
|
|
|
|
|
haggenx wrote: if i programming with html and vbscript, these programs called "hta files" must pay licences?
Why do you think that?
---
b { font-weight: normal; }
|
|
|
|
|
well, because i want develop small systems in this language, but i dont know if may pay licences.
Cuando salga el sol, no estare aqui...
|
|
|
|
|