agrothe 26 Junior Poster

What have you tried so far?

agrothe 26 Junior Poster

Hey folks. Great job on the new site!

Reporting a strange overlay issue on the Homepage in Chrome 19.0.1084.46 m on 64bit Windows 7.

There is a taller than normal header and a blank spot on the right sidebar that, on mouseover, displays an overlay on the screen. Like the login box overlay but without the login box... If that makes sense.

Clear cache, etc etc of course.

EDIT:

Just realized it was my Adblock extension. The "spots" were blank because of adblock, but the overlay still showed on mouseover. Not sure if you can put placeholder images where the ads go to make it a little more clear as to what is happening?

Any way, keep up the good work!

agrothe 26 Junior Poster

Hmm, off the top of my head, name is depreciated. What browser are you trying? Swap out "name" for "id".

Also, try

onclick="return clearVillage();"

Some browsers, (IE usually), likes the return keyword at times.

Also,

Check to ensure the button isn't calling the function before the function is declared. (i.e. is the function declared in the <head> tag?)

agrothe 26 Junior Poster

A friend of my recently asked me to help him set up a web based radio. Upon doing some research I found he has only original content (not copy right stuff), all static mp3 files, not live talk, and wants to loop the audio.

I've found sites like radionomy and some free shoutcast hosting sites but they all either inject ads into the audio or make you use a page covered in ads.

I got to thinking: In .NET/asp I can set the headers/mime type of my page as say pdf/excel file/zip file etc and the browser offers it as a download.

In PHP (his server only supports php) is it possible to set a file mime type as some sort of streaming file m3u or something? It would of course need to keep serving mp3s so when one finished another one would start.

Curious if anyone has some input on the subject matter!

Thanks.

agrothe 26 Junior Poster

Thanks for your help! I'm finding this example very useful and will attempt to apply it to my project.

I just want to make sure I have a proper understanding of the code;

The top half is declaring the class and variables. get and set are bassically assigning null values. The first line of the second block of code declares a list class. the " ... " represent where the loop mechanism would be. new ImageFile creates a new object and the remaining lines; (after the equal signs) assign the properties.

This simple project puts the pieces together for you. I commented pretty much every line to explain how things work.

Kimpl commented: Very helpfull for the op. +1
agrothe 26 Junior Poster

Some strange errors occurring in my asp.net website.

I was using the MS ApplicationBlocks.data.dll to connect o my SQL database. Once I started testing my website on IIS as opposed to the ASP.NET development server, I started getting connection pool errors.

So, like anyone would, I searched for every instance of opening a recordset and ensured that each one was closed right after being done with it.

Still no luck.

So, I wrote my own data wrapper function, very basic, which returns a DataReader and explicitly closes the connection each time.

Then, I started getting an "ExecuteReader requires an open and available Connection. The connection's current state is closed.." error. I've modfied my function as below, which catches the error, clears the Connection Pools an re-opens the connection. This function hasn't caused any problems in my testing, except that every 9-11 clicks I notice a much longer page load as the exception is caught and handled.

I really don't want to leave this code as is. Can anyone shed some light onto the possible root cause?

Thanks!!!

Private Function _getRS(ByVal strSql As String) As System.Data.SqlClient.SqlDataReader
        Dim conn As New System.Data.SqlClient.SqlConnection(strSQLconn)
        Dim cmd As New System.Data.SqlClient.SqlCommand(strSql, conn)
        Dim rs As System.Data.SqlClient.SqlDataReader
        Try
            conn.Open()
            rs = cmd.ExecuteReader
        Catch ex As Exception

            System.Data.SqlClient.SqlConnection.ClearPool(conn)
            System.Data.SqlClient.SqlConnection.ClearAllPools()
            System.GC.Collect()
            conn.Open()
            rs = cmd.ExecuteReader
        Finally


        End Try
        Return rs

        cmd.Dispose()
        cmd = Nothing
        conn.Close()
        conn.Dispose()
        conn = Nothing

    End Function
agrothe 26 Junior Poster

Can you please verify the exact line and highlight it? I havn't see the addnew method used like that before, not saying it won't work, but just to make sure.

aashishn86 commented: you were right... it doesn't work this way :) +1
agrothe 26 Junior Poster

Sounds like, sir, that you need more than a Forum. A specific item can certainly be addressed, but you really can't expect to learn how to create websites from a forum. May I suggest this link a starting point?

peter_budo commented: Good recommedation considering the nature of the request... +14
agrothe 26 Junior Poster

I'm in the process of building a new menu editor for someone at work. I don't know if I've been at this too long or just can't see the forest for the trees....

The database structure's menu items like
id, title, parentid, listorder, link, etc

I'm trying to write this to the asp.net page like so:

<ul>
    <li>menu 1</li>
    <li>menu 2
        <ul>
             <li>submenu 1</li>
        </ul>
    </li>
</ul>

Of course, there may be any number of sub menus, sub submenus, etc...

If there was only 1 nested submenu it would be easy, but what is the best way to handle unlimited submenus and a simple code example of such?

FYI, I'm using VS 2008 targeting .Net 2.0

agrothe 26 Junior Poster

so apparently you can't call a page containing ajax from an ajax script. So I hear. I've also heard about a work around. Something like having all the ajax on the parent page or something.

Does anyone have more information on this?

agrothe 26 Junior Poster

Can anyone identify which editor/program/ide this ASP generated code may have come from?

Thanks a million if you can!

<html><!-- InstanceBegin template="/Templates/standard.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>*sniped*</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" href="Assets/css/layout.css" type="text/css">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
agrothe 26 Junior Poster

A client has asked me to add a data mining module to a database of customer orders.

I'd appreciate if anyone can point me to an algorithm which can help find trends and order patters from a group of dates.

Does something like this exist? I'm stuck with VBA as my language as the database is access and there is no budget to implement any other types of libraries.

I'd appreciate any help here.

agrothe 26 Junior Poster

Hi,
at url http://lowellbonnell.ca/index.php?view=Markets my ajax will only work if you insert the www in firefox. IE is fine either way.

Any ideas?

agrothe 26 Junior Poster

I've developed a quote/order database in access 2003 for a customer, so this is primarily a VBA solution, but I'm mostly after theory today so vba or vb is irrelavant.

I have of course normalized tables containing historical and current orders.

Right now, I have a reminder type form that shows all completed orders from a year ago from current date + 30 days.

So if today is Feb 1st 2007, it shows all orders from feb 1st 2006 to march 2 2006 and allows the operator to click a button and have an email reminder sent to the customer asking if they'd like to reorder. Easy enough and done.

HOWEVER, suppose the customer doesn't order on a yearly basis? Maybe it's a 6 month order cycle or 7 month, or something non-even, like every may, oct and dec?

What I've tried is adding up all the months that a customer orders, so in the past 7 years, ignoring the year part of the dates, which month did the customer most often order?

Seams to give some decent results but I'd like to more accurate figures. Any suggestions?

agrothe 26 Junior Poster

Hey,

I've taken over a php based website from another developer (ugh!)...

The website uses two include files to display ads down both sides of the page. Now the client wants these ads to display in Random positions....

So, Its easy enough to take the ad text and place it in variables,

$sAdText[0] = '<tr><tr>link text and ad image here</td></tr>';
$sAdText[1] = '<tr><tr>link text and ad image here</td></tr>';
$sAdText[2] = '<tr><tr>link text and ad image here</td></tr>';

How would I go about getting these to display randomly? I can reverse them with a loop I guess, but I'd like a more random solution than that if possible.

agrothe 26 Junior Poster

I've revived an old java project I did in college. Basic chat type program like ICQ which stores offline messages and users in a database etc, etc.

I've recently switched the database from Access to MySQL and am considering some other alterations.

I've been reading a bit on RMI. I guess what I'd like to know is can I pass more than just string across the sockets? The program uses a BufferedReader and I just built it to pass delimited strings which both the client and server parsed on either end.

I'm not sure if java supports user-defined-types either, but I guess thats basically what I'd like to pass back and forth just to make things easier.

agrothe 26 Junior Poster

I've added a vbscript to an asp page in order to print without showing the print dialog box.

Everything works fine when you first load the page, but when you try and navigate away from the page, you get the "A script on this page has caused internet explorer to run slowly" error.

this code was added in the <head> tags,

<%
  Sub cmdClickMe_OnClick
          WBControl.ExecWB 6,2,3
          set WBControl = nothing
  End Sub
%>

and this on the page body,

<object id="WBControl" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
<img src="images/print.gif" NAME="cmdClickMe" VALUE="Click> Me"
agrothe 26 Junior Poster

I'm new to VB so my question is probably very simple. anyway here it is..

I want to make a side bar showing one form that is like a sidebar in a web page such as on the left side of the MDI form. Which holds the programs main functions .. Then once a button is pressed on that form, I want it to show the form that performs that action in the right pane. Without just popping up . I've tried setting the left property of the window popping up and the dimensions larger than the screen but it doesn't work , and when I set it to maximize on start, then it covers the left frame.

Any help appreciated.

Sound like you need to add an image control to your MDI form. It will snap to either side or to top or bottom. Then you can add buttons, combo's and other controls to the image control. Or was it a picture control? Image or picture, only one will work, but that sounds like your solution.

Also, forms will automatically see the edge of your image control as the edge of the mdi form, so scroll bars will appear properly if the form goes behind the image control so users and scroll over to see it.

Comatose commented: Nice Job On This One +5
jonc commented: Superb, I was looking for an idea on making a sidebar - that's cleared it all up. Thanks! +2
agrothe 26 Junior Poster

how do i add the numbers in a listbox and display it in another textbox?

Create new project, add list1 and txtText1 to the form1 and paste:

Option Explicit

Private Sub Form_Load()
    Dim x As Integer
    Dim inx As Integer 'counter
    
    List1.AddItem "1"
    List1.AddItem "2"
    
    For inx = 0 To List1.ListCount - 1
        x = x + CInt(List1.List(inx))
    Next
    txtText1.Text = x
    
End Sub
agrothe 26 Junior Poster

yes it is! any shape you want, how many form you want....

look here:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=50793&lngWId=1

or here:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12991&lngWId=1&txtForceRefresh=627200610312635313


it's easy!

Neither of those projects have references to DirectX, so don't waiste your time trying them. They deal with custom form shapes.

Here are some tutorials on programming with DirectDraw.
http://francis.dupont.free.fr/coindev/english/

Comatose commented: Thanks. +3